06c376b5 by Jeff Balicki

SWIPER

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent f24ffa56
......@@ -26124,6 +26124,7 @@
jQuery(document).ready(function ($) {
jQuery('.carousel-items').each(function () {
var _id = jQuery(this).parent().attr('id');
var thisSwiper = this;
var swiper_params = {
modules: [Navigation, Pagination, A11y, Keyboard],
slidesOffsetAfter: 0,
......@@ -26160,9 +26161,17 @@
}
}
};
if ($(window).width() > 1074) {
new Swiper(this, swiper_params);
var mySwiper = new Swiper(thisSwiper, swiper_params);
if ($(window).width() < 1074) {
mySwiper.destroy(false, true);
}
$(window).on('resize', function () {
if ($(window).width() > 1074) {
mySwiper = new Swiper(thisSwiper, swiper_params);
} else {
mySwiper.destroy(false, true);
}
});
});
// $('.carousel ').css('margin-left',"-"+$('#content').css('margin-left'));
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -21,6 +21,7 @@ jQuery(document).ready(function($) {
var _id = jQuery(this).parent().attr('id');
var thisSwiper = this;
var swiper_params = {
modules: [Navigation, Pagination, A11y, Keyboard],
......@@ -62,20 +63,22 @@ jQuery(document).ready(function($) {
},
};
var mySwiper;
if ($(window).width() > 1074) {
mySwiper = new Swiper(this, swiper_params);
var mySwiper = new Swiper(thisSwiper, swiper_params);
if ($(window).width() < 1074) {
mySwiper.destroy(false, true);
};
$(window).on('resize', function(){
if ($(window).width() > 1074) {
mySwiper = new Swiper(this, swiper_params);
mySwiper = new Swiper(thisSwiper, swiper_params);
}else{
mySwiper.destroy(true, true)
mySwiper.destroy(false, true);
}
});
});
});
// $('.carousel ').css('margin-left',"-"+$('#content').css('margin-left'));
......