Skip to content

Instantly share code, notes, and snippets.

@miguelwicht
Created September 3, 2012 19:08
Show Gist options
  • Save miguelwicht/3612495 to your computer and use it in GitHub Desktop.
Save miguelwicht/3612495 to your computer and use it in GitHub Desktop.
Simple script that toggles a button on click and removes active classes on all other buttons, so that there is just one active button at all times
$('.button').click(function(){
$('.button').removeClass('active');
$(this).addClass('active');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment