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
精彩评论