Skip to content

Instantly share code, notes, and snippets.

@yfktn
Created October 13, 2014 05:24
Show Gist options
  • Save yfktn/9705467cde930716d536 to your computer and use it in GitHub Desktop.
Save yfktn/9705467cde930716d536 to your computer and use it in GitHub Desktop.
JS Script to automatically set menu as active in the bootstrap nav
$('ul.nav a[href="' + window.location + '"]').parent().addClass('active');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment