JQUERY-UI Draggables - Seralize is running before the Draggable is complete
Posted
by nobosh
on Stack Overflow
See other posts from Stack Overflow
or by nobosh
Published on 2010-05-24T01:43:10Z
Indexed on
2010/05/24
1:51 UTC
Read the original article
Hit count: 366
Hello,
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 seralize 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,3,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 Seralize funtion to say, wait till JQUERY animations are all done, or stop all that are going on to ensure the DOM is accurate?
Thanks
© Stack Overflow or respective owner