Skip to content

Instantly share code, notes, and snippets.

@zetareticoli
Created December 2, 2014 15:55
Show Gist options
  • Save zetareticoli/1a5dea5b4e68b49a62aa to your computer and use it in GitHub Desktop.
Save zetareticoli/1a5dea5b4e68b49a62aa to your computer and use it in GitHub Desktop.
Trigger event click on a button which makes something visible.
$('.button').click(function(event){
event.stopPropagation();
event.preventDefault();
$(this).toggleClass("clicked");
$('.element').toggleClass("visible");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment