Active nav color but different color in submenu

Hello i have this js script to get the url and show an active link on main nav menu and in sub menu. The only problem is that if i click a link in main menu and get the active color for that link then the sub menu will also show that same color. I dont want the sub menu links to show this color, i dont want the submenu link color to change before i click a link in the 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 the menu here

The easiest way is to have .current a{} only target the immediate anchor to follow (CSS).

.current_yes>a{}

Ohh so simple. Thank you very much. :relaxed:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.