Last active
August 3, 2018 09:08
-
-
Save fotan/7182e76291ec008a8c2f to your computer and use it in GitHub Desktop.
BS3 - Delay open/close YAMM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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