Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const area = Array.prototype.slice.call(document.querySelectorAll('area'));
- area.forEach(el => {
- el.onclick = e => {
- e.preventDefault();
- document.querySelector('.here').textContent = el.getAttribute('href').replace('#', '');
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement