Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 = "Hello";
title.innerHTML = "The button has been clicked!";
});
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.