Reputation: 583
$("#theDiv").hover(function(){
$(this).animate( {top: "300px", left: "400px", width: "50px" , height: "50px" },"Fast")
});
$("#theDiv").click(function(){
$(this).stop();
});
Code as above. I tried to stop the hover function when I click it, but it doesn't work. Or is it not possible at all ?
Upvotes: 0
Views: 54
Reputation: 35399
$("#theDiv").mouseenter(function(){
$(this).animate( {
top: "300px",
left: "400px",
width: "50px" ,
height: "50px"
} , "fast");
}).click(function(){
$(this).stop(true, false);
});
.stop( [clearQueue] [, jumpToEnd] )
Upvotes: 1