When testing my site in Firebug, I get this error when I click on the menu button:
uncaught exception: Syntax error, unrecognized expression: [href = schedule.html]
I think this is going wrong here because the current class will not apply, but everything else works fine (this is not complete code)
HTML:
<nav>
<ul>
<li><a class="current" href="index.html">HOME</a></li>
<li><a href="schedule.html">SCHEDULE</a></li>
</ul>
</nav>
JS:
$("nav a").removeClass("current");
$("nav a[href="+newHash+"]").addClass("current");
source
share