Posted By

perelin on 07/17/06


Tagged

css visibility


Versions (?)

SCHMOE_onOffElement


 / Published in: JavaScript
 

// v6.0 SCHMOE Mod v.2: // switches between (display:'block';) and (display:'none';) // bsp: MMSCHMOEshowHideLayers('swissmap');

  1. function SCHMOE_onOffElement()
  2. {
  3. var i, p, v, obj, k;
  4. var args=SCHMOE_onOffLayers.arguments;
  5. for (i=0; i<(args.length); i++)
  6. {
  7. if ((obj=MM_findObj(args[i]))!=null)
  8. {
  9. if (obj.style)
  10. {
  11. obj=obj.style;
  12. if (obj.display == 'none') { v='block'; }
  13. if (obj.display == 'block') { v='none'; }
  14. if (obj.display == '') { v='none'; }
  15. }
  16. obj.display=v;
  17. }
  18. }
  19. }

Report this snippet  

You need to login to post a comment.