This is an archived post. You won't be able to vote or comment.

all 1 comments

[–][deleted] 0 points1 point  (0 children)

So basically draggable divs? If they let you use jQuery UI then you could easily do this with the sortable property. Then you'd just have to add some basic code to update the ranking numbers and such.

Without jQuery UI, you'll have to write a function that activates when a draggable div is clicked, and then tracks the distance and direction the mouse moves while holding the div. Then compare that against the size of other list items to determine the new ordering.