I've been struggling to make this code work in order to add the active class to my navigation list item, but it just won't cooperate.
Home
<li id="orange">
<a href="hotels.php"><span class="glyphicon glyphicon-bed icondeco"></span>Hotel</a>
</li>
<li id="blue">
<a href="flights.php"><span class="glyphicon glyphicon-plane icondeco"></span>Flight</a>
</li>
<li id='red'>
<a href="cars.php"> <span class="glyphicon glyphicon-star icondeco"></span>cars</a>
</li>
<li id='green'>
<a href="visas.php"> <span class='glyphicon glyphicon-tags icondeco'></span>Visas</a>
</li>
<li id='plum'>
<a href="vacation.php"><span class='glyphicon glyphicon-heart icondeco'></span>Vacations</a>
</li>
<li id='purple'>
<a href="corporate.php"><span class='glyphicon glyphicon-briefcase icondeco'></span>Corporate</a>
</li>
</ul>
// I have this code at the bottom of the body of my page
<!-- Bootstrap Core JavaScript -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<script>
$('.nav li').click(function(){
$('.nav li').addClass('active').siblings().removeClass('active');
})
</script>