Hello. i have this menu code:
<!-- Responsive menu -->
<div class='rmm' data-menu-title = "Navigation" data-menu-style = "custom">
<ul>
<li><a href="./menu.html">HOME</a></li>
<li><a href="./menu2.html">CLIENTS</a></li>
<li><a href="./menu3.html">PROJECTS</a></li>
<li><a href="./menu4.html">CONTACT US</a></li>
<li><a href="./menu5.html">WEBSHOP</a></li>
<li><a href="./menu6.html">ADMIN</a>
</li>
</ul>
</div>
And then i got this .js code to show an active link color in a sparat file (activelink.js):
jQuery(document).ready(function($){
var url = window.location.href;
$(‘.rmm a’).filter(function() {
return this.href == url;
}).closest(‘li’).addClass(‘current_yes’);
});
and in the in the .js file that makes the menu function i have this:
some code…
var nav = $(this),
currentPageItem = $(‘.current_yes’, nav);
some more code…
And this works well, but now i’m working on another menu and the code for this menu looks like this:
<!-- Responsive menu -->
<div class="ribbon">
<div class="rmm style">
<ul>
<li>
<a href="">HOME</a>
</li>
<li>
<a href="">PROJECTS</a>
<ul>
<li>
<a href="">IKEA - NORWAY</a>
</li>
<li>
<a href="">FASTEC - SWEDEN</a>
</li>
</ul>
</li>
<li>
<a href="">CLIENTS</a>
<ul>
<li>
<a href="">IKEA</a>
</li>
<li>
<a href="">FASTEC</a>
</li>
</ul>
</li>
<li>
<a href="">CONTACT US</a>
</li>
<li>
<a href="">WEBSHOP</a>
</li>
<li>
<a href="">ADMIN</a>
<ul>
<li>
<a href="">STAFF</a>
</li>
<li>
<a href="">DOCUMENTS</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
But the problem is that the code in the activelink.js file do not work for this. Any body know way? I have tested to replace the .rmm a to several other classes like: .ribbon a or .rmm.style etc.
Thank you.