javascript - Making links active dynamically upon click -
i'm using bootstrap's default navbar. want active page represented dark gray block dynamically upon clicking link. can't seem work. here's code have far. it's similar question except i'm trying integrate bootstrap.
codeply went down? new demo edits here.
i think want
$(".navbar-nav a").click(function() { $(".navbar-nav > .active").removeclass("active"); $(this).parent().addclass("active"); return false; });
Comments
Post a Comment