[jQuery] on the fly div and ui droppable problem
hi all
i found a problem with jquery ui droppable,
i give the target div a css class which drag and drop is working
fine , but when i create another div with the class on the fly and
append it to the HTML the drop doesn't work
are there any solution ?
the code is like that
<script>
$(".pheader").droppable({
accept: ".ads",
drop: function(ev, ui) {
ui.draggable.clone().fadeOut("fast",
function() {
$(this).fadeIn("fast") ;
}).appendTo($(this).empty());
}
});
/* the problem div */
$('<div class="pheader" > </div>').appendTo("#ground");
</script>