i have this jquery script:
$('#add').click(function(){
$('<div class="drag" style="left:20px;"/>')
.text( num++ )
.appendTo( document.body )
.css({
top: $( window ).height() - 500 ,
left:$( window ).width() - 500
});
});
this will create: <div class="drag" style="left:20px;"/></div>
what i am interested in creating is this:
<div class="drag" style="left:20px;"/>
<div class="handle SE">
</div>
</div>
if i do this:
...
$('<div class="drag" style="left:20px;"/><div class="handle SE">')
.text( num++ )
...
jquery will create 2 separate di'vs and not nested.
any ideas?
thanks