Toogle Slide Div


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



Copy this code and paste it in your HTML
  1. // Slide divs
  2.  
  3. //Hide (Collapse) the toggle containers on load
  4. $(".toggle_container").hide();
  5.  
  6. //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
  7. $("span.trigger").click(function(){
  8. $(this).toggleClass("active").next().slideToggle("slow");
  9. });
  10.  

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.