I have this toggle button in which when i click on it the button shows that it is active and the css changes so it is darker. but when i click the other button the toggle doesn't deactivate (on/off) i want to change that so that it turns on when i click on it and off when i click on the other button.
buttons
<div class="btn-group float_right">
<a id="gridBtn" onclick="$.views.stuff.ToggleView('gridView')" title="View as grid" class="btn" href="#"><i class="icon-th-large"></i></a>
<a id="listBtn" onclick="$.views.stuff.ToggleView('listView')" title="View as list" class="btn" href="#"><i class="icon-th-list"></i></a>
</div>
javascript
$(document).ready(function () {
$('a#gridBtn').click(function () {
$(this).toggleClass("down");
});
$('a#listBtn').click(function () {
$(this).toggleClass("down");
});
});