Posted By

ricosushi on 07/14/10


Tagged

toggle


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

ricosushi
Some0ne
NARKOZ
dhollifield
sdpfost
gbot


Toggle box


 / Published in: jQuery
 

URL: http://luiszuno.com/themes/watercolor/spring/about.html

Toggle visibility box

  1. // toggle
  2. $(".toggle-container").hide();
  3. $("h2.toggle-trigger").click(function(){
  4. $(this).toggleClass("active").next().slideToggle("slow");
  5. return false;
  6. });
  7.  
  8.  
  9. // usage
  10. <h2 class="toggle-trigger custom2"><a href="#">Toggle Switch</a></h2>
  11. <div class="toggle-container">
  12. <div class="block">
  13. <p>Pellentesque habitant morbc dui. </p>
  14. </div>
  15. </div>

Report this snippet  

You need to login to post a comment.