Advertisement
Guest User

Untitled

a guest
Sep 30th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. function hideshow(which){
  3. if (!document.getElementById)
  4. return
  5. if (which.style.display=="block")
  6. which.style.display="none"
  7. else
  8. document.getElementById('adiv1').style.display = "none";
  9. document.getElementById('adiv2').style.display = "none";
  10. document.getElementById('adiv3').style.display = "none";
  11. which.style.display="block"
  12. }
  13. </script>
  14. <a href="javascript:hideshow(document.getElementById('adiv1'))">Option 1</a>
  15. <div id="adiv1" style="font:24px bold; display: block">Option 1 description</div>
  16. <a href="javascript:hideshow(document.getElementById('adiv2'))">Option 2</a>
  17. <div id="adiv2" style="font:24px bold; display: block">Option 2 description</div>
  18. <a href="javascript:hideshow(document.getElementById('adiv3'))">Option 3</a>
  19. <div id="adiv3" style="font:24px bold; display: block">Option 3 description</div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement