Trying to change class="active" to different menu item
<nav id="mainmenu" role="navigation">
<ul>
<li><a href="/" class="active">Home</a></li>
<li><a href="/about-us.html">About</a>
</li>
<li><a href="/membership.html">Membership</a>
</li>
<li><a href="/committees.html">Committees</a>
</li>
<li><a href="/programs.html">Programs</a>
</li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</nav>
$(document).ready(function(){
var i = document.location.href.lastIndexOf("/");
var currentPHP = document.location.href.substr(i+1);
$("ul#mainmenu li a").removeClass('active');
$("ul#mainmenu li a[href^='"+currentHTML+"']").addClass('active');
});