jquery - Active nav color but different color in submenu -


hello have js script url , show active link on main nav menu , in sub menu. problem if click link in main menu , active color link sub menu show same color. dont want sub menu links show color, dont want submenu link color change before click link in sub menu.

jquery(document).ready(function($) {         var url = window.location.href;         $('.ribbon a').filter(function() {                 return this.href == url;             })             .closest('li').addclass('current_yes').addclass('sub_current_yes');  }); 

you can see menu here

your css file applying class 'a' tags inside current_yes class, i.e siblings. apply on immediate siblings try replacing .current_yes a in css file .current_yes > a


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -