开发者

JQUERY-UI Draggables - Seralize is running before the Draggable is complete

I'm using the JQUERY-UI draggable plugin. As a setting, when the Draggable is done, using the STOP setting I run a function to serialize a list of LIs to get their order in terms of their IDs.

For example, if I have an UL, with a list of LIs with the following IDs: 1,2,3,4,5

If I then move 5, between 2&3, the seralize is returning: 1,2,5,开发者_StackOverflow3,4,5

Which makes me think that the jQuery UI-Draggable STOP is running before the page is finished rendering, or the DOM isn't update?

Any ideas on how I can fix this from happening. Is there something I can do in my Serialize function to say, wait till jQuery animations are all done, or stop all that are going on to ensure the DOM is accurate?


Try the update event instead of the stop event...

This event is triggered when the user stopped sorting and the DOM position has changed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜