Created
March 29, 2014 13:13
-
-
Save jbutko/9854270 to your computer and use it in GitHub Desktop.
jQuery: jQuery add and remove class on a menu/nav
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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