Line 187: | Line 187: | ||
</ul> | </ul> | ||
− | + | ||
− | + | <style> | |
+ | .dropdown:hover .dropdown-menu { | ||
+ | display: block; | ||
+ | margin-top: 0; // remove the gap so it doesn't close | ||
+ | } | ||
+ | </style> | ||
+ | <!-- | ||
+ | <script> | ||
+ | |||
+ | |||
+ | $('.dropdown').hover(function() { | ||
+ | $('.dropdown-toggle', this).trigger('click'); | ||
+ | }); | ||
+ | // Add slideDown animation to Bootstrap dropdown when expanding. | ||
+ | $('.dropdown').on('show.bs.dropdown', function() { | ||
+ | $(this).find('.dropdown-menu').first().stop(true, true).slideDown(); | ||
+ | }); | ||
− | + | // Add slideUp animation to Bootstrap dropdown when collapsing. | |
− | + | $('.dropdown').on('hide.bs.dropdown', function() { | |
− | + | $(this).find('.dropdown-menu').first().stop(true, true).deslideUp(); | |
− | + | }); | |
− | + | </script> | |
− | + | --> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
</div> | </div> | ||
</nav> | </nav> |
Revision as of 14:06, 11 October 2018