let element = document.getElementById(".class"); element.addEventListener('click', function(){ console.log("click"); });