Skip to content

Instantly share code, notes, and snippets.

@driesd
Created October 15, 2013 07:46
Show Gist options
  • Save driesd/6987987 to your computer and use it in GitHub Desktop.
Save driesd/6987987 to your computer and use it in GitHub Desktop.
Sets the menu title to the active trail
$('.toggle h3').each(function() {
$(this).text($(this).next().find('li.active-trail').find('a').text());
if($(this).text() === "") {
$(this).html('Menu');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment