Hi All, I have a simple JavaScript code (below). When I click a text link "active" is CSS class that changes the background to a grey colour. Awesome. However, I'm not sure how to set it so when it is clicked again if the hgrey colour is active to set it to default? Any ideas?
$(function () {
$("#drop_down a").click(function (e) {
e.preventDefault();
$("#nav li a").addClass("active").not(this).removeClass("active");
$("active").toggle();
});
});