Navigation bar isn't unhighlighting
-
Hi,
So the plugin is working perfectly apart from one small issue. When I click something on the nav bar, it highlights the selected page but it also doesn’t unhighlight the previous page. If I click through every page then they will all end up highlighted.
I have this code under ‘Click Code’
// highlight the current menu item jQuery('ul.menu li').each(function() { jQuery(this).removeClass('current-menu-item'); }); jQuery(thiss).parents('li').addClass('current-menu-item'); jQuery(document).ready(function($) { var navigation; navigation = $('#primary-navigation'); navigation.find('a').click(function() { navigation.removeClass('toggled-on'); }); });
I’m using the standard twenty fourteen theme. Can anyone help?
I have also tried
// highlight the current menu item jQuery('ul.menu li').each(function() { jQuery(this).removeClass('current-menu-item'); jQuery(this).removeClass('current_page_item'); }); jQuery(thiss).parents('li').addClass('current_page_item'); jQuery(thiss).parents('li').addClass('current-menu-item');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Navigation bar isn't unhighlighting’ is closed to new replies.