Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const addEventListener = () => {
- document.addEventListener('click', (e) => {
- if (e.target.className === 'click-me') {
- alert('I was clicked');
- }
- });
- }
- addEventListener();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement