how to indicate a change in list elements' order using jquery?

Posted by keisimone on Stack Overflow See other posts from Stack Overflow or by keisimone
Published on 2009-08-27T07:49:24Z Indexed on 2010/04/16 5:03 UTC
Read the original article Hit count: 334

Filed under:
|
|
|

i am using jquery sortable.

right now i have a list of items that i can ALREADY use drag and drop. which is cool.

i will use a submit button at the bottom of the list to submit the new order. the change in the list is not automatically submitted.

All i need is somehow indicate that an element's position has changed. I googled quite a bit. no answer.

original list:

item1 item2 item3 item4 item5

submitbutton here.

changed list: i moved item 2 below item3 for eg.

item1 item3 item2 * item4 item5

submitbutton here.

how do i use the sortable in jquery for me to display a sign on the item 2?

i think should be the change event of sortable but i still do not know how to use it since i am a newbie in jquery.

http://docs.jquery.com/UI/Sortable#event-change

thank you.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about sortable