i'm not sure what is wrong with this script but it just doesn't seem to want to work. What is meant to happen is that the box should fade the color in and out according to mouseenter/leave.
$(document).ready(function() {
$('.square-box').mouseenter(function() {
$(this).animate({
background-color: '#AAAAAA'
}, 1000);
});
$('.square-box').mouseleave(function() {
$(this).animate({
background-color: '#CCCCCC'
}, 1000);
});
});
https://jsfiddle.net/k9met5oz/
What am i doing wrong? Thanks.