$(".myDropClass").droppable(
{
accept: '.myDragClass',
drop: function (event, ui) {
//remove old item
alert('Dropped');
$(this).find(".myDragClassPlaceHolder").remove();
var listHtml = "
"
" +
"New Droppable area" + ui.draggable.text() + "
"New Droppable area" + ui.draggable.text() + "
alert('Added1');
$(this).append(listHtml);
alert('Added');
$(this).find('#ontheflyDiv').droppable({
drop: function(event, ui)
{
alert('Set the droppable behavior to the newly created element');
$(this).append("hello");
}
});
}
});
No comments:
Post a Comment