THE CODE
const copy = document.querySelectorAll('.copy-me');
copy.addEventListener('copy', function(){
console.log('OI! My content has copyright!');
alert(' OI! My content has copyright! ');
});
THE ERROR Uncaught TypeError: copy.addEventListener is not a function at sandbox.js:3
NO ERROR CODE
const copy = document.querySelector('.copy-me');
copy.addEventListener('copy', function(){
console.log('OI! My content has copyright!');
alert(' OI! My content has copyright! ');
});
I want to use multiple class that is why i want ".querySelectorAll"