i am trying to animate a div using this code
var home_news_side = $('#home_news_side');
var side_timer;
home_news_side.mouseenter(function() {
console.info('asd');
clearTimeout(side_timer);
home_news_side.animate({
'margin-left': 0
}, 800);
}).mouseleave(function() {
side_timer = setTimeout(function() {
home_news_side.animate({
'margin-left': '-404px'
}, 800);
}, 800);
});
But its not working.... and if i try to force in te console like this:
$('#home_news_side').animate({
'margin-left': 0
}, 800);
i am getting this message
TypeError: Object # has no method 'animate'
here is the link to see the error Error link
Obs: i put a display none in the div until i fix this problem...