SHARE
TWEET

Untitled

a guest Jun 19th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var links = document.querySelectorAll('a');
  2. console.log(links);
  3. function show(event) {
  4.     if (this.nextElementSibling.style.visibility === 'hidden') {
  5.         this.nextElementSibling.style.visibility = 'visible';
  6.     }
  7.     else {
  8.         this.nextElementSibling.style.visibility = 'hidden';
  9.     }
  10. }
  11. for (var i = 0; i < links.length; i++) {
  12.     links[i].addEventListener('click', show);
  13. }
RAW Paste Data
Top