Created
June 10, 2014 09:44
-
-
Save AaronLayton/e4c0a73cb19643a899a6 to your computer and use it in GitHub Desktop.
Bootstrap hover dropdowns
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
// This will add the 'open' class on hover to all dropdowns if the user is on a wide screen | |
// and then remove the 'open' class when you mouse out | |
$('.dropdown').hover(function () { | |
if ($(window).width() >= 768) { | |
$(this).toggleClass('open'); | |
} | |
}, function () { | |
$(this).removeClass('open'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment