I cannot figure out what's going on with this script, it just won't cooperate. The intended behavior is for the box to fade its color in and out based on mouse enter/leave actions.
$(document).ready(function() {
$('.square-box').mouseenter(function() {
$(this).animate({
background-color: '#AAAAAA'
}, 1000);
});
$('.square-box').mouseleave(function() {
$(this).animate({
background-color: '#CCCCCC'
}, 1000);
});
});
Any ideas on what might be the issue? Appreciate any help.