开发者

Animated List Rearrangement (JQuery UI Sortable)

开发者 https://www.devze.com 2023-01-10 06:25 出处:网络
I\'m trying to build a sortable listed thats animated. Apples Bananas Cavemen 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 a

I'm trying to build a sortable listed thats animated.

  • Apples
  • Bananas
  • Cavemen

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.

$( ".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 开发者_StackOverflow社区plugin from scratch?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消