jQuery Sortable,通过拖出删除当前Item [英] Jquery Sortable, delete current Item by drag out
问题描述
我的问题: 可排序事件输出:当我在列表中拖动某些内容或对列表进行排序时触发. 但是我只想在拖出一个项目时启动该功能.
My Problem: The sortable event out: fires when I drag something in the list or when I sort the list. But I only want to start the function when I drag an item out.
我的代码
$(document).ready(function ust()
{
$('#div1').sortable({
out: function(event, ui) { $('#nfo').append('OUT<br />'); }
});
});
工作示例 http://jsfiddle.net/FrbW8/22/
推荐答案
这是out回调的默认行为.请参阅此jquery ui 交通票证
This is the default behaviour of the out callback. See this jquery ui trac ticket
我真的不同意逻辑"行为概念.
I really do not agree with the 'logical' behaviour notion.
但是,请注意" out回调 拖动时仍会触发 进入列表,然后释放鼠标 (但如果您不在列表中,则不会). 这是合乎逻辑的行为,并且会发生 常规排序对象也是如此."
"However, note that the "out" callback will still be triggered if you drag into a list and then release the mouse (but not if you're not over the list). This is logical behaviour and happens for normal sortables as well."
这篇关于jQuery Sortable,通过拖出删除当前Item的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!