Skip to content

Instantly share code, notes, and snippets.

@abrcoelho
Created July 12, 2012 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrcoelho/3098688 to your computer and use it in GitHub Desktop.
Save abrcoelho/3098688 to your computer and use it in GitHub Desktop.
var currentURL = window.location.pathname;
$('.tabs a, .main-nav a, .touchcarousel a').each(function(index, element){
path = element.pathname;
if(currentURL.match(path)){ $(element).addClass('current'); }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment