queryselector em javascript code example
Example 1: document queryselector click event
const buttons = document.querySelectorAll("#select .button")
for (const button of buttons) {
button.addEventListener('click', function(event) {
//...
})
}
Example 2: queryselector for jquery
var x = $(".yourclass")[0];
console.log('jq' + x);
var y = document.querySelector(".yourclass");
console.log('js' + y);