I have a Position Fixed Nav at the top of my webpage. The Nav also has a drop down menu which slides down and stays down until it is clicked again.
What I am trying to achieve is, if the sub menu is open, and the user decides to scroll down the page a bit, the sub menu will automatically close.
What I currently have is:
$(document).scroll(function() {
$(".subMenu").slideUp(300);
});
But this method is far to sensitive and closes the drop down with the slightest scroll.
Ideally I could have the menu slide back up AFTER I scroll UP or DOWN 300px, so that there is some sort of "buffer" room.