toogle objects' visibility


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



Copy this code and paste it in your HTML
  1. function toggle(obj) {
  2. var el = document.getElementById(obj);
  3. if ( el.style.display != 'none' ) {
  4. el.style.display = 'none';
  5. } else {
  6. el.style.display = '';
  7. }
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.