Skip to content

Instantly share code, notes, and snippets.

@mbvissers
Last active December 29, 2020 15:27
Show Gist options
  • Save mbvissers/d59b71d07859771af42df5f834e0727c to your computer and use it in GitHub Desktop.
Save mbvissers/d59b71d07859771af42df5f834e0727c to your computer and use it in GitHub Desktop.
<!-- import jQuery using the google CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$("button.add#1").on("click", function () {
console.log("clicked button 1");
})
</script>
<button class="add" id="1">Button 1</button>
<button class="add" id="2">Button 2</button>
<button class="add" id="3">Button 3</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment