Jquery: How to add a delay to mouseleave so if someone accidentally hovers off the element unintentionally, it still stays open
THE hoverintent plugin is the opposite of what I need. I have a .popup that is triggered by .trigger, when i hover off of it, i want .popup to NOT fadeout for a few seconds, but if I hover off, then hover on again, cancel the fadeout that was going to happen and keep the .popup open. Does anyone know how I would do this? This DOESN'T work, but it was an idea: $('.trigger').hover(function(){ $('.popup').fadeIn(600) }, function() { $('.popup').delay(2000, function(){ if ($(this).blur() = true) { $('.popup').fadeOut(600) } }); }) the jQuery HoverIntent plugin is exactly what your looking for. The