potatoDie Web Development Scrapbook
Assorted thoughts about web development
Combining row striping and jQuery UI Sortable plugin
Posted by on June 15, 2011
Using row striping to improve the display of a list of items, and combining it with the jQuery UI Sortable plugin, I noticed a little confusion when adjusting of the alternating row striping took place immediately after dropping the item. A dark-coloured row may change to a lighter shade, so you may doubt the operation succeeded.
You could decide to forget about readjusting the row colouring, but that would look clumsy: the striping becomes chaotic. In that case better to not use row striping at all.
I found that using the option revertĀ helps. It defines a small animation (I chose 200 ms) that gives enough reassurance the operation succeeded.
Advertisement