Is it possible to animate a background color change in a click function? I saw many examples with mouseover/hover functions but none with a click function. Only without animation following line works:
$('#element').css({ backgroundColor: "#99cc00" });
I tried to add an animation effect with:
$('#element').animate({ backgroundColor: '#ffffff' }, 2000);
and
$('#element').css({ backgroundColor: "#99cc00" }).animate({}, 2500);
but without an effect. Please have a look at my fiddle: http://jsfiddle.net/dna6B/
Any ideas?