I'm using the sortable_element
function in Rails to make a list of <li>
elements sortable. This is working fine and I can drag and drop to my heart's content.
What I really want to do though is change the appearance of (some of) the list items depending on what item the user dropped where in the list. E.g. if the user drops an item at the top of the list, the background colour of the remaining items turns red.
Anyone know how to achieve this?
Cheers Ben