- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I’m converting this site to WordPress.
Old: http://trustok.com/about/professional-team/officers/division/corporate/
New: http://trustbank.aaronheine.com/about/professional-team/officers/division/corporate-division
Problem is when I go to pages the navigation is not remaining open to where that page is.
I guess I need to add .nav-path-selected to current <li>
?
I can’t see how that is being done.
Thanks
Yes need to add nav-path-selected
try this code its will work.
http://codepen.io/gmkhussain/pen/GZbQYQ
jQuery(document).ready(function() {
var url = window.location;
jQuery('ul.nav a[href="' + url + '"]').parent().addClass('active');
jQuery('ul.nav a').filter(function() {
return this.href == url;
}).parent().addClass('nav-path-selected');
});
New: http://trustbank.aaronheine.com/about/professional-team/officers/division/corporate-division
For Pete’s sake, if you want us to help you check why something might not be working on your site, please do NOT disable right-clicking! In fact, do not EVER disable right-clicking.
Anyway…you should use the native WordPress menu functionality. That way, menu options will automatically get an “active” class when you’re on a specific page, that you can then target with CSS and/or Javascript.
Thanks. Disabling right click is not something I did.