jquery - When items are hovered fast they're not returning to its default state -


with reference this question

when mouseenter on each item, overlay disappearing, when mouseleave - overlay shows.

when have more items, , fast hovering on them randomly, they're not returning it's previous state. it's quite annoying :/

why that?

 $('.item').mouseenter(function () { var $this = $(this); settimeout(function () {     $this.find('.item-overlay').css('z-index', '-1'); }, 300);  }).mouseleave(function () { $(this).find('.item-overlay').css('z-index', '1');  }); 

http://jsfiddle.net/w3gha/

try hover(): http://jsfiddle.net/kfs9h/

  $(".item").hover(       function () {            $(this).find('.item-overlay').stop().css('z-index', '-1');       },       function () {            $(this).find('.item-overlay').stop().css('z-index', '1');       }   ); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -