I have a piece of code that basically says: if you flip this, then another thing will appear, and if you expand it, it will disappear.
The problem is that if I take out the mouse and roll it too many times, the elements appear / disappear too many times (because I created many events for this by mistake)
my code is as follows:
$('div.accordionContent').mouseenter(function()
{
$(this).find(".something").animate({left: 0}, 300)}).mouseleave(function() {
$(this).find(".something").animate({
left: -200}, 500);;
});
How can I say to avoid multiple freezes?
I am using jQuery 1.4.3 if this helps.
source
share