I have my view, which displays a simple list of player names, one after
the other contained in a parent div. They are named item_1, item_2,
item_3 etc. (based on what position they are in) I have a form that adds
a new player in a new position, so it adds the player model bla bla,
thats all fine. The remote form calls a method which calls a .rjs file,
which updates the div to add the new item at the bottom of the lot. What
I now need to do and cannot for the life of me figure out is how to then
sort all the div items (using scriptaculous lets you do that right?) so
that they are back in 1, 2, 3 order. (for instance, i might have item_1,
item_3 present, and then a player is added with a position of 2, so
item_2 is created and put right at the bottom, i need to then sort the
lot)
Thanks,
Alex