$(\".block li\").hover( function(){ $(this).animate({backgroundColor: \"#000\"}); }, function(){ $(this).animate({backgroundColor: \"#fff
I got a solution to this issue from this link
$('#test').animate({ backgroundColor: "#DFC21D", }, 1000, function() { $('#test').css("backgroundColor","transparent"); });