Posted By


perelin on 07/17/06

Tagged


Statistics


Viewed 706 times
Favorited by 0 user(s)

SCHMOE_onOffElement


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

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.