Skip to content

Instantly share code, notes, and snippets.

@jbutko
Created March 29, 2014 13:13
Show Gist options
  • Save jbutko/9854270 to your computer and use it in GitHub Desktop.
Save jbutko/9854270 to your computer and use it in GitHub Desktop.
jQuery: jQuery add and remove class on a menu/nav
$(function(){
$(".navtab>li").click(function(){
$(this).addClass('selected').siblings().removeClass('selected');
});
});
// From http://stackoverflow.com/questions/12606784/jquery-add-and-remove-class-on-a-menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment