Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. var ats = $('.accordion > .title'), ads = $('.accordion > .desc');
  2. ats.on('click', function () {
  3. if($(this).hasClass('open')) {
  4. $(this).removeClass('open');
  5. $(this).next().slideUp();
  6. } else {
  7. ads.slideUp("slow");
  8. ats.removeClass('open');
  9. $(this).addClass('open');
  10. $(this).next().slideDown();
  11. return false;
  12. }
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement