Posted By

icecreamboyy on 02/23/11


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Some0ne
jillella


Showing hidden content with jQuery


 / Published in: jQuery
 

  1. <script src="http://jquery.com/src/jquery-latest.js"></script>
  2. <script type="text/javascript">
  3. function init()
  4. {
  5. $(".showing").toggle(
  6. function()
  7. {
  8. $(this).prev().show("slow");
  9. $(this).text("Show");
  10. return false;
  11. },
  12. function()
  13. {
  14. $(this).prev().hide("fast");
  15. $(this).text("Hide");
  16. return false;
  17. }
  18. );
  19. }
  20. $(document).ready(init);
  21. </script>

Report this snippet  

You need to login to post a comment.