删除可拖动对象jQuery UI [英] Remove draggable object jquery ui
本文介绍了删除可拖动对象jQuery UI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有可拖动的对象,如何添加删除按钮以删除该对象?
I have draggable objects, how can I add remove button to delete this object?
推荐答案
假定以下HTML结构..
Assuming some HTML structure as follows..
<div class="draggable-container">
<div class="close">
</div>
</div>
.draggable-container
{
position:relative;
}
.close
{
position:absolute;
left:10px;
top:10px;
cursor:pointer;
}
$('.draggable-container .close').click(function(){
//implement close here
// eg: $(this).closest('.draggable-container').fadeOut();
});
这篇关于删除可拖动对象jQuery UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文