Skip to content

Instantly share code, notes, and snippets.

@imamo
Created August 11, 2011 07:36
Show Gist options
  • Save imamo/1139096 to your computer and use it in GitHub Desktop.
Save imamo/1139096 to your computer and use it in GitHub Desktop.
Active menu class
$(function(){ // Start up jQuery
$("#top_nav a").each(function() {
if(this.href == window.location) $('#top_nav li').addClass("active");
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment