Created
July 18, 2016 23:29
-
-
Save briankompanee/e190fde221867d5857d10ea398ac2f0d to your computer and use it in GitHub Desktop.
JavaScript: Allow bootstrap menu items to be linked and show on hover.
This file contains 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
// Allow bootstrap menu items to be linked and show on hover. | |
$('#primary-navigation .dropdown-toggle').click(function() { | |
var location = $(this).attr('href'); | |
window.location.href = location; | |
return false; | |
}); | |
//Add Fade Amination on Hover | |
$('#primary-navigation ul.nav li.dropdown').hover(function() { | |
$(this).find('.dropdown-menu').stop(true, true).delay(50).fadeIn(200); | |
}, function() { | |
$(this).find('.dropdown-menu').stop(true, true).delay(50).fadeOut(200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment