Reputation: 72652
I'm must be doing something stupid, because I can't make this simple animate work :P
$(document).ready(function() {
$('li').hover(function() {
$(this).stop().animate({
backgroundColor: '#ff3300'
}, 500);
}, function() {
$(this).stop().animate({
backgroundColor: '#000000'
}, 500);
});
});
It doesn't do the animation.
Upvotes: 0
Views: 86
Reputation: 47978
You have to reference jQuery UI script file too. (In jsFiddle check the jQuery UI 1.8.7
box). That's where the animate
function is.
( http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.js )
Upvotes: 6