Skip to content

Instantly share code, notes, and snippets.

@AdamSoucie
Created June 20, 2017 05:46
Show Gist options
  • Save AdamSoucie/3cea2cf5cffc45d8a2829d98a252c72f to your computer and use it in GitHub Desktop.
Save AdamSoucie/3cea2cf5cffc45d8a2829d98a252c72f to your computer and use it in GitHub Desktop.
function toggleARIAExpanded(menu)
{
var isExpanded = menu.attr('aria-expanded');
if( isExpanded === 'true' )
{
menu.attr('aria-expanded', 'false');
menu.toggleClass('active');
}
else
{
menu.attr('aria-expanded', 'true');
menu.toggleClass('active');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment