Skip to content

Instantly share code, notes, and snippets.

@csakiistvan
Created August 15, 2014 09:06
Show Gist options
  • Save csakiistvan/305858b9c23e191388d6 to your computer and use it in GitHub Desktop.
Save csakiistvan/305858b9c23e191388d6 to your computer and use it in GitHub Desktop.
Enable Bootstrap 3 Hover Dropdowns.
(function ($) {
Drupal.behaviors.mytheme_name = {
attach: function (context) {
// Enable Bootstrap 3 Hover Dropdowns.
var width = $(document).width();
if (width >= 976) {
$('.dropdown-toggle').click(function() {
var location = $(this).attr('href');
window.location.href = location; return false;
});
}
}
};
})(jQuery);
.dropdown:hover .dropdown-menu {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment