Skip to content

Instantly share code, notes, and snippets.

@jmcclellan
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmcclellan/0bac8e04bccc48543dad to your computer and use it in GitHub Desktop.
Save jmcclellan/0bac8e04bccc48543dad to your computer and use it in GitHub Desktop.
Open nav menu on hover instead of click when using the Roots framework
// add open class to dropdown menu when hovered over
$(function() {
$(".dropdown").hover(
function(){ $(this).addClass('open'); },
function(){ $(this).removeClass('open'); }
);
});
/* show the child dropdown menu on hover of parent */
ul.nav li.dropdown:hover > ul.dropdown-menu {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment