Remove in Jquery divs with draggables and resizables

匆匆过客 提交于 2019-12-13 01:17:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!