I need a Javascript equivalent to the following code. I am converting a php website into a django website and on a static page I have the following:
<li<?if($page == "home") {?> class="active"<?}?>><a href="/home" title="Home">Home</a></li>
The problem is I would like to remove the php here and have the class=”active” when on that page using javascript
If you REALLY need to do this, you can use
.addClass()in jquery http://api.jquery.com/addClass/