在Jquery div中使用可拖动对象和可调整大小的对象进行删除 [英] Remove in Jquery divs with draggables and resizables
本文介绍了在Jquery div中使用可拖动对象和可调整大小的对象进行删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题: 当您将div设置为可拖动和可调整大小时,后来又要删除时,我需要销毁可拖动和可调整大小的东西吗?投掷物品也一样.
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.
示例:
$("element").draggable("destroy").resizable("destroy").remove();
还是只需要??
$("element").remove();
当您要使用可拖动元素替换具有元素的div的html时,也是如此:
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();
还是只需要??
$(".parent").html(newHtml).find(".newsElements").draggable().resizable();
谢谢.
推荐答案
$('.class')
.html('bla')
.remove();
仅此而已.
这篇关于在Jquery div中使用可拖动对象和可调整大小的对象进行删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文