I have a fixed Nav position at the top of my web page. Nav also has a drop-down menu that slides down and stays down until it is pressed again.
I try to reach, if the submenu is open, and the user decides to scroll down a bit, the submenu will automatically close.
I currently have:
$(document).scroll(function() { $(".subMenu").slideUp(300); });
But this method is very sensitive and closes the drop-down menu with the slightest scroll.
Ideally, I could create a menu slide back AFTER I scroll UP or DOWN 300px, so there is some kind of βbufferβ room.
source share