Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ats = $('.accordion > .title'), ads = $('.accordion > .desc');
- ats.on('click', function () {
- if($(this).hasClass('open')) {
- $(this).removeClass('open');
- $(this).next().slideUp();
- } else {
- ads.slideUp("slow");
- ats.removeClass('open');
- $(this).addClass('open');
- $(this).next().slideDown();
- return false;
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement