Skip to content

Instantly share code, notes, and snippets.

@Pross
Last active March 1, 2021 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/643d68b7be51222e70bb707bff22e5c9 to your computer and use it in GitHub Desktop.
Save Pross/643d68b7be51222e70bb707bff22e5c9 to your computer and use it in GitHub Desktop.
(function($){
$(document).ready(function(){
// This runs on ready function
// Add Copy+Pasta here
// assuming whut class is added to button group and we want the 2nd button
// if 3 buttons it would be 0,1,2 so we want child 1
$('.whut').find('a').children().eq(1)
.on('click',function(e){
e.preventDefault();
// this is where you add your trigger.
// $(document).trigger('whatever');
console.log('clicked');
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment