Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;(function ($, window, document) {
- $(function () {
- $('[data-accordion]').each(function () {
- var $accordion = $(this);
- $('.accordion__title').on('click', function () {
- if ($(this).next().is(':visible')) {
- $(this).next().slideUp(300);
- return;
- }
- $accordion.find('.accordion__content').stop().slideUp(300);
- $(this).next().stop().slideDown(300);
- })
- })
- })
- })(jQuery, window, document)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement