Posted By

assbach on 12/10/06


Tagged

show css toggle visibility hide hidden


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

xhtmled
basicmagic
tmarkiewicz


toggle visibility (show/hide)


 / Published in: JavaScript
 

toggle a div via JS/CSS style

  1. function toggle(obj) {
  2. var el = document.getElementById(obj);
  3. el.style.display = (el.style.display != 'none' ? 'none' : '' );
  4. }

Report this snippet  

You need to login to post a comment.