Created
November 4, 2020 11:23
-
-
Save juliends/684d3bd99a1fa01004b986cc8441cb7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select the button | |
// const button = document.getElementById('btn'); | |
const button = document.querySelector('#btn'); | |
// Listen to click event | |
button.addEventListener('click', (event) => { | |
// Update the btn text - Callback | |
event.currentTarget.innerText = 'Please wait'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment