Q:

Release toggle effect when clicking on another link

I currently have JavaScript that causes a link to change background color when clicked:
$(".button").click(function(){ 
    $(this).css('background-color', '#555');
});

And it works, but I would like that color to toggle off when I click on another link.

A:

You can do like this
$(function() {
  $(".button").click(function() {
    $(this).css('background-color', '#555');
    $(".button").not($(this)).css('background-color', '');

  });
});

JSFIDDLE

