jQuery - Animate function

Posted by Arun Kumar on Stack Overflow See other posts from Stack Overflow or by Arun Kumar
Published on 2012-12-20T10:55:34Z Indexed on 2012/12/20 11:03 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

I have a piece of code shown below:

$(".tagArea li").mouseover(function(){
  $(this).animate({
      borderWidth: "2px"
  }, 1000 );
});
$(".tagArea li").mouseout(function () {
$(this).animate({
      borderWidth: "1px"
  }, 1000 );
}); 

When I try to hover it on a particular list item, it properly animates but doesn't stop doing just once. It keeps doing 2 or 3 times.

How to avoid this, I 've tried many a times but no positive result occurs to me.

Kindly help.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html