potatoDie Web Development Scrapbook

Assorted thoughts about web development

Combining row striping and jQuery UI Sortable plugin

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.