Last active
May 9, 2020 13:08
-
-
Save gavilanch/ee7ace8894e15088fec956d0f3431167 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
| function initializeCounterComponent(container) { | |
| var boton = container.querySelector("#counterClick"); | |
| var title = container.querySelector("h1"); | |
| if (boton) { | |
| boton.addEventListener("click", (e) => { | |
| console.log("click JavaScript"); | |
| let button = e.target; | |
| button.innerHTML = "Hola"; | |
| title.innerHTML = "El botón ha sido clickeado!"; | |
| }); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment