开发者

When hover too fast between elements, double elements show

When I hover between elements very quickly, two or more elements will show. If move slowly, it works perfect. Here's the code:

$("#services_menu a").hover(function(e) {
  var id = this.hash;
    $("#services_description div:visible").not(id).fadeOut('fast', function(){
    $(id).fadeIn();
  });
  e.preventDefault();
});
$("#services_descr开发者_JAVA技巧iption div:not(#agency_leasing)").hide();

How do I fix this? Thanks.


Just put

.stop(true,true)
before fadeOut and fadeIn

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜