I am using php includes to build a mutipage website. Using jquery, how would I add a class "active" to each webpage the menu highlight whatever webpage the user is currently looking at.
This is my nav html:
<nav class="menu">
<ul class="nav">
<li><?php if ($thisPage=="Home")
echo " id=\"currentpage\""; ?><a href="http://urcsc170.org/pdouge/project3xc/index.php">Home</a></li>
<li><?php if ($thisPage=="Jeff Bezos")
echo " id=\"currentpage\""; ?><a href="http://urcsc170.org/pdouge/project3xc/jeff-bezos.php">Jeff Bezos</a></li>
<li><?php if ($thisPage=="Larry Page")
echo " id=\"currentpage\""; ?><a href="http://urcsc170.org/pdouge/project3xc/larry-page.php">Larry Page</a></li>
<li><?php if ($thisPage=="Edward Snowden")
echo " id=\"currentpage\""; ?><a href="http://urcsc170.org/pdouge/project3xc/edward-snowden.php">Edward Snowden</a></li>
<li><?php if ($thisPage=="Elon Musk")
echo " id=\"currentpage\""; ?><a href="http://urcsc170.org/pdouge/project3xc/elon-musk.php">Elon Musk</a></li>
</ul>
</nav>