Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.acc-table-wrap__title').on('click', function(){
- var $slider = $(this).next('.acc-table-wrap__body').find('.acc-table-slider');
- if (!$(this).hasClass('active')) {
- $(this).addClass('active');
- } else {
- $(this).removeClass('active');
- };
- $(this).next('.acc-table-wrap__body').toggle();
- if ($(window).width() <= 1890 && !$slider.hasClass('slick-slider')) {
- $slider.slick({
- dots: false,
- infinite: true,
- arrows: true,
- slidesToShow: 4,
- slidesToScroll: 1,
- speed: 500,
- responsive: [
- {
- breakpoint: 1279,
- settings: {
- slidesToShow: 3,
- slidesToScroll: 1
- }
- },
- {
- breakpoint: 1023,
- settings: {
- slidesToShow: 2,
- slidesToScroll: 1
- }
- },
- {
- breakpoint: 767,
- settings: {
- slidesToShow: 1,
- slidesToScroll: 1
- }
- }
- ]
- });
- };
- if ($slider.hasClass('slick-slider')) {
- $slider.slick('refresh');
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement