[jQuery] sortable list and re-ordering

[jQuery] sortable list and re-ordering


I hope I describe this properly...
I'm working with the Interface plugins and using a sortable list. I'm having
trouble understanding how exactly the onchange callback works. I tried
onchange: reorder(this) but it isn't working. What I need to do is know
which list item was just moved, so naturally I tried this. How do I
determine by id which element I just moved?
Thats the first part. For the second part I need to find the html inside a
span that has a class which is in the li just above the newly moved li. So
my html structure is as follows...
<li id="1"><span class="foo">html</span></li>
<li id="2"><span class="foo">html</span></li> - this is the newly moved li
So how would I find the html inside the span in li 1? I played around with
the parent() and sibling() stuff, but nothing worked. I'm not understanding
what values these functions take.
On a side note... is there a way to only sort items on a Y or X axis? It
seems if I drag an item too far its removed from the list. I'd like to keep
it confined to vertical movement only.
--
View this message in context: http://www.nabble.com/sortable-list-and-re-ordering-tf1924966.html#a5271033
Sent from the JQuery forum at Nabble.com.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/