I am using Jquery animate to have an image pop up upon hover over 'button' in a couple motions and then return. I am trying to use the stop function to prevent the image from jumping up and down when the cursor moves back and forth over the button. I can't seem to get the stop function to work properly . When I put the stop before the animate (I have put it before the first .animate, all of them and before the last one to no avail) the image wont pop up at all or else comes up incorrectly. I am not sure what I am doing wrong.
$(document).ready(function(){
$("#bearup").hover(function(){
$("#shopbears").animate({top:['-=120px','swing']},2000).animate({top:'+=0px'},2000)
.animate({top:'+=50px'},3200).animate({top:'+=70px'});
});
});
I have created a fiddle for the .animate problem. http://jsfiddle.net/gerstley/dgWDy. Perhaps someone can figure out a way to keep the motions from stacking up.