I have the following piece of code - jsfiddle example
The problem i'm having at the moment is layering up of the functions if you mouseover/off. I thought adding a stop function would help this out but if you run the mouse over the trigger a few times it breaks and the fun开发者_运维问答ction stops working.
Would be great if someone could help me out on this!
you need to use stop(true, true)
. See the docs .stop( [ clearQueue ], [ jumpToEnd ] )
fiddle
jQuery("#offer-logo").hover(function() {
jQuery("#offer-content").stop(true, true).show(250);
}, function() {
jQuery("#offer-content").stop(true, true).hide(300);
});
Instead of stop try using .delay(100)
Seems to fix it, at least on FF4.
精彩评论