JQUERY ""MOSTRAR - OCULTAR CAPA"


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



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

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.