I have a <ul> in which I use jQuery UI Sortable to allow sorting of contained <li> s.
<li> decorated with alternating background colors using:
.list-striped li:nth-child(odd) { background-color: #f9f9f9; }
I use Sortable start and stop functions to create a nice transition when the <li> dragged like this:
$( ".sortable" ).sortable({ start: function(event, ui){ $(ui.item).animate({ 'background-color': '#333333' }, 'fast'); }, stop: function(event, ui){ $(ui.item).animate({ 'background-color': '' }, 'fast'); } });
Now my problem is that when we clear the background color, it does not return to the previous background color (or inherits the background color that it should from CSS). Am I trying to achieve something?
source share