(function ($) { // USE STRICT "use strict"; /*================================================================== [ Slick1 ]*/ $('.wrap-slick1').each(function(){ var wrapSlick1 = $(this); var slick1 = $(this).find('.slick1'); var itemSlick1 = $(slick1).find('.item-slick1'); var layerSlick1 = $(slick1).find('.layer-slick1'); var actionSlick1 = []; $(slick1).on('init', function(){ var layerCurrentItem = $(itemSlick1[0]).find('.layer-slick1'); for(var i=0; i 0) { showDot = true; } $(slick1).slick({ pauseOnFocus: false, pauseOnHover: false, slidesToShow: 1, slidesToScroll: 1, fade: true, speed: 1000, infinite: true, autoplay: true, autoplaySpeed: 6000, arrows: true, appendArrows: $(wrapSlick1), prevArrow:'', nextArrow:'', dots: showDot, appendDots: $(wrapSlick1).find('.wrap-slick1-dots'), dotsClass:'slick1-dots', customPaging: function(slick, index) { var linkThumb = $(slick.$slides[index]).data('thumb'); var caption = $(slick.$slides[index]).data('caption'); return '' + '' + caption + ''; }, }); $(slick1).on('afterChange', function(event, slick, currentSlide){ var layerCurrentItem = $(itemSlick1[currentSlide]).find('.layer-slick1'); for(var i=0; i', nextArrow:'', responsive: [ { breakpoint: 1200, settings: { slidesToShow: 4, slidesToScroll: 4 } }, { breakpoint: 992, settings: { slidesToShow: 3, slidesToScroll: 3 } }, { breakpoint: 768, settings: { slidesToShow: 2, slidesToScroll: 2 } }, { breakpoint: 576, settings: { slidesToShow: 1, slidesToScroll: 1 } } ] }); }); $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { var nameTab = $(e.target).attr('href'); $(nameTab).find('.slick2').slick('reinit'); }); /*================================================================== [ Slick3 ]*/ $('.wrap-slick3').each(function(){ $(this).find('.slick3').slick({ slidesToShow: 1, slidesToScroll: 1, fade: true, infinite: true, autoplay: false, autoplaySpeed: 6000, arrows: true, appendArrows: $(this).find('.wrap-slick3-arrows'), prevArrow:'', nextArrow:'', dots: true, appendDots: $(this).find('.wrap-slick3-dots'), dotsClass:'slick3-dots', customPaging: function(slick, index) { var portrait = $(slick.$slides[index]).data('thumb'); return '
'; }, }); }); })(jQuery);