问题
i have a question: When you make a div as draggable and resizable and later when you want remove, i need destroy draggable and resizables? The same for droppables.
Example:
$("element").draggable("destroy").resizable("destroy").remove();
or only need?:
$("element").remove();
The same for when you want replace html of a div that have elements with draggables:
$(".parent .elements").draggable("destroy").resizable("destroy").parent().html(newHtml).find(".newsElements").draggable().resizable();
or only need?:
$(".parent").html(newHtml).find(".newsElements").draggable().resizable();
Thanks.
回答1:
$('.class')
.html('bla')
.remove();
Thats all.
来源:https://stackoverflow.com/questions/7514337/remove-in-jquery-divs-with-draggables-and-resizables