Posted By

madebycrunch on 10/31/14


Tagged


Versions (?)

jQuery - Page Component - Accordion


 / Published in: jQuery
 

jQuery - Page Component - Accordion

  1. $('.accordion div.tab').on('click', function() {
  2. $(this).next().slideToggle();
  3. });
  4. $(".accordion div.tab a").on('click', function() {
  5. if ($(this).attr("class") == "active")
  6. $(this).removeClass("active");
  7. else
  8. $(this).addClass("active");
  9. });

Report this snippet  

You need to login to post a comment.