$(document).ready(function () { $(".modules li").click(function () { var image = $(this).data("image"); if($(this).hasClass("open")) { return false; } else { $(".modules li").removeClass("open"); $(".modules li p").slideUp() $(this).addClass("open").find("p").slideDown(); $(".modules .module-image img").fadeOut(); $(".modules .module-image").find(".image" + image).fadeIn(); } }); $(".tab-box li").click(function () { var tabBox = $(this).parent().parent().parent().parent(); var listElement = $(this); var content = $(this).data("content"); if(listElement.hasClass("open")) { return false; } else { listElement.siblings("li").removeClass("open"); listElement.addClass("open"); tabBox.find(".tab-content").fadeOut(); tabBox.find(".content" + content).fadeIn(); } }); $(".custom-carousel").each(function () { var dataslidesPerRowxl = $(this).data("slidesperrow-xl"); var dataslidesPerRowlg = $(this).data("slidesperrow-lg"); var dataslidesPerRowmd = $(this).data("slidesperrow-md"); var dataslidesPerRowsm = $(this).data("slidesperrow-sm"); var dataslidesPerRowxs = $(this).data("slidesperrow-xs"); $(this).slick({ slidesPerRow: dataslidesPerRowxl, //slidesToShow: 6, //slidesToScroll: 5 responsive: [ { breakpoint: 1200, settings: { slidesPerRow: dataslidesPerRowlg, dots: true, }, }, { breakpoint: 992, settings: { slidesPerRow: dataslidesPerRowmd, dots: true, }, }, { breakpoint: 768, settings: { slidesPerRow: dataslidesPerRowsm, dots: true, }, }, { breakpoint: 576, settings: { slidesPerRow: dataslidesPerRowxs, dots: true, }, }, ], }); }); $(".image-slider").slick({ infinite: false, arrows: false, dots: true }); });