Okay so basically when the page loads, I want to have a class called "active" added to my id #navHome. However, the class does not show. My HTML part is an include so I don't know if it has to do with that or if I just did something stupid wrong?
This is what I have:
HTML part:
<ul id="navList">
<li><a href="index.php" title="Home" id="navHome">home</a></li>
<li><a href="#" title="About" id="navAbout">about</a></li>
<li><a href="portfolio.php" title="Portfolio" id="navPortfolio">portfolio</a></li>
<li><a href="#" title="Contact" id="navContact">contact</a></li>
</ul>
CSS part:
.active {
font-family: 'OpenSansBold';
color: #3fe3ab;
background: url('../design/images/navLiner.png') left center no-repeat;
}
jQuery part:
$(document).ready(function(){
$('#navHome').addClass('active');
});
-->jsfiddle.net/cf4GD .. check if you properly included jQuery.