Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
_s theme: multiple menus on a page
* Handle multiple menus on one page
$('.main-navigation .menu-toggle').on('click', function(){
var $nav = $(this).parents('.main-navigation'),
$ul = $nav.find('');
if ($(this).hasClass('toggled')) {
$nav.toggleClass('toggled').attr('aria-expanded', true);
$ul.attr('aria-expanded', true);
} else {
$nav.toggleClass('toggled').attr('aria-expanded', false);
$ul.attr('aria-expanded', false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.