Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Easy jQuery Accordion Functionality for RWD Navigation
var menu = $j('#menu'),
menulink = $j('.menu-link'),
menuTrigger = $j('.has-submenu > a');
menulink.click(function(e) {
e.preventDefault();
menulink.toggleClass('active');
menu.toggleClass('active');
});
menuTrigger.click(function(e) {
e.preventDefault();
$j(this).toggleClass('active').next('ul').toggleClass('active');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment