Skip to content

Instantly share code, notes, and snippets.

@fotan
Last active August 3, 2018 09:08
Show Gist options
  • Select an option

  • Save fotan/7182e76291ec008a8c2f to your computer and use it in GitHub Desktop.

Select an option

Save fotan/7182e76291ec008a8c2f to your computer and use it in GitHub Desktop.
BS3 - Delay open/close YAMM
<script>
// Good addition to YAMM (Yet Another Mega Menu) for BS3
// Just add to footer area
// Slows down the opening of the menu so it doesn't fly open every time your mouse touches it.
// fadeIn / fadeOut adjust the time it takes for the menu to open or close
$('.dropdown').hover(function() {
$(this).find('.dropdown-menu').stop(true, true).delay(100).fadeIn(100);
}, function() {
$(this).find('.dropdown-menu').stop(true, true).delay(10).fadeOut(100);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment