SyntaxFix
Write A Post
Hire A Developer
Questions
For single-page sites where the menu items simply jump down to other sections of the page, this simple solution works for me:
$('.nav li').on('click', function(){ $('.nav li').removeClass('active'); $(this).addClass('active'); });