Can someone help me troubleshoot why the text in my navigation bar isn't changing color on hover? Here are my HTML, CSS, and JS codes:
HTML
<div class="nav">
<ul class="pull-left">
<li><a href="#">Ride</a></li>
<li><a href="#">Drive</a></li>
</ul>
<ul class="pull-right">
<li><a href="#">find a city</a></li>
<li><a href="#">help</a></li>
<li><a href="#">sign in</a></li>
</ul>
</div>
CSS: I'm not sure whether to select 'a' or 'li'
.nav a {
padding: 14px 10px;
text-transform: uppercase;
font-family: Avenir;
font-size: 14px;
font-weight: bold;
color: black;
text-decoration: none;
}
.nav li {
display: inline;
}
.nav {
padding-top: 30px;
padding-right: 30px;
}
.add {
color: maroon;
}
JS
$(document).ready(function() {
$('.nav').hover(function() {
$('a').addClass('add')
}, function() {
$('a').removeClass('add')
});
});
Any assistance would be greatly appreciated!