[英]Animated List Rearrangement (JQuery UI Sortable)
I'm trying to build a sortable listed thats animated. 我正在尝试建立一个可排序的动画列表。
Let's say I've selected Apples and I want to switch it with Cavemen, I want to click on Apples, drag it to cavemen and have bannas and cave men animate up to the proper positions. 假设我选择了苹果,并且想用“穴居人”切换它,我想单击“苹果”,将其拖动到穴居人中,并让香蕉和穴居人动画到适当的位置。
I am aware that JQuery UI Sortable allows for some level of this functionality, but I'm not sure if there is a way to specify something during a pause before the DOM changes or through some cloning. 我知道JQuery UI Sortable允许某种程度的此功能,但是我不确定是否有办法在DOM更改之前的暂停期间或通过某些克隆指定某些内容。
$( ".selector" ).sortable({
change: function(event, ui) { ... }
});
Would it be possible to manipulate sortable
to provide this level of functionality, or would I be better off writing a plugin from scratch? 是否可以通过操作
sortable
来提供这种级别的功能,还是最好从头开始编写插件?
I think this is what you want... 我想这就是你想要的...
$( ".selector" ).sortable({
start: function(event, ui) { ... }
});
See this page for more detail: http://jqueryui.com/demos/sortable/#event-start 请参阅此页面以获取更多详细信息: http : //jqueryui.com/demos/sortable/#event-start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.