(function($){ "use strict"; var THEMEMAX = {}, $window = $(window), $document = $(document); /*-------------------------*/ /* Swiper Slider */ /*-------------------------*/ THEMEMAX.swiperSlider = function () { $( '.swiper-container' ).each(function () { var sectionId = $(this).data('section_id') var preSelector = sectionId ? `#${sectionId}` : '' console.log('preSelector', preSelector); var swiper = new Swiper( $( this ), { slidesPerView: (($(this).attr('data-items')) ? $(this).attr('data-items') : 4), spaceBetween: (($(this).attr('data-space')) ? $(this).data('space') : 15), autoplay: (($(this).attr('data-autoplay')) ? $(this).data('autoplay') : false), loop: (($(this).attr('data-loop')) ? $(this).data('loop') : false), centeredSlides: (($(this).attr('data-centered')) ? $(this).data('centered') : false), slideToClickedSlide: $(this).data('slide_to_clicked_slide'), navigation: { nextEl: `${preSelector} .swiper-button-next`, prevEl: `${preSelector} .swiper-button-prev`, }, pagination: { el: '.swiper-pagination', clickable: true, }, breakpoints: { 1200: {slidesPerView: (($(this).attr('data-items')) ? $(this).attr('data-items') : 4),}, 992: {slidesPerView: (($(this).attr('data-lg-items')) ? $(this).attr('data-lg-items') : 3),}, 768: {slidesPerView: (($(this).attr('data-md-items')) ? $(this).attr('data-md-items') : 2),}, 480: {slidesPerView: (($(this).attr('data-sm-items')) ? $(this).attr('data-sm-items') : 1),}, 0: {slidesPerView: (($(this).attr('data-xs-items')) ? $(this).attr('data-xs-items') : 1),} } }); if (sectionId) { window[`swiper_${sectionId}`] = swiper } }); }; window.sessionStorage.removeItem('facets_active_idx') //Window load functions $window.on('load', function () { }); //Document ready functions $document.ready(function () { THEMEMAX.swiperSlider(); }); window.THEMEMAX = THEMEMAX })(jQuery); var isbounce = false document.addEventListener('shopify:section:load', (e)=>{ if (isbounce) { return } isbounce = true setTimeout(function() { isbounce = false $.fn.AuxinAppearAnimationsInit($(document)); }, 300) });