Posted By

danideu on 11/11/07


Tagged

javascript capas


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

arcturus
martingoldszein


JQUERY ""MOSTRAR - OCULTAR CAPA"


 / Published in: JavaScript
 

URL: http://www.webintenta.com/9914.html

  1. INSIDE THE HEAD
  2. ......................................................................
  3.  
  4. <script type="text/javascript" src="jquery.js"></script>
  5. <script type="text/javascript">
  6. $(function()
  7. {
  8.  
  9. $("#trigger").click(function(event) {
  10. event.preventDefault();
  11. $("#box").slideToggle();
  12. });
  13.  
  14. $("#box a").click(function(event) {
  15. event.preventDefault();
  16. $("#box").slideUp();
  17. });
  18. });
  19. </script>
  20.  
  21.  
  22. HTML
  23. ......................................................................
  24.  
  25. <a href="#" id="trigger">TRIGGER</a>
  26.  
  27. <div id="box">
  28. <a href="#" class="close">[x]</a>
  29. <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren</p>
  30. </div>
  31.  
  32. CSS
  33. ......................................................................
  34. #box {
  35. display: none;
  36. }

Report this snippet  

You need to login to post a comment.