div class changer


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function changeDiv(wdiv) {
  2. thediv = document.getElementById(wdiv);
  3. if(thediv.className == 'folderclosed'){
  4. thediv.className = 'folderopen';
  5. } else if (thediv.className == 'folderopen'){
  6. thediv.className = 'folderclosed';
  7. }
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.