Advertisement
Jousway

abuse all the arrays!

Sep 7th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var active = [];
  2. function resize(id) {
  3.     var div = document.getElementById(id);
  4.         if(active[id] == 1) {
  5.         div.style.display = "none";
  6.         active[id] = 0
  7.     } else {
  8.         div.style.display = "initial";
  9.         active[id] = 1
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement