Swiper One
var swiperCurrent;
var swiper = new Swiper('.swiper-container-1', {
init: false,
pagination: '.swiper-pagination-1',
nextButton: '.swiper-button-next-1',
prevButton: '.swiper-button-prev-1',
slidesPerView: 3,
centeredSlides: true,
paginationClickable: true,
initialSlide: 2,
spaceBetween: 22,
breakpoints: {
992: {
slidesPerView: 1,
spaceBetween: 10
}
},
runCallbacksOnInit:true
});
function showSliderContent2(idx) {
$('._ooredoo_banner_content_1> div').hide(0);
$('._ooredoo_banner_content_1> div:eq('+ idx +')').fadeIn(200)
}
swiper.on('init', function (el) {
showSliderContent(el.activeIndex);
});
swiper.on('transitionEnd', function (el) {
if(swiperCurrent !== el.activeIndex){
showSliderContent(el.activeIndex);
swiperCurrent = el.activeIndex;
}
});
swiper.init();
Swiper Two
var swiperCurrent2;
var swiper = new Swiper('.swiper-container-2, {
init: false,
pagination: '.swiper-pagination-2',
nextButton: '.swiper-button-next-2',
prevButton: '.swiper-button-prev-2',
slidesPerView: 3,
centeredSlides: true,
paginationClickable: true,
initialSlide: 2,
spaceBetween: 22,
breakpoints: {
992: {
slidesPerView: 1,
spaceBetween: 10
}
},
runCallbacksOnInit:true
});
function showSliderContent2(idx) {
$('._ooredoo_banner_content_2> div').hide(0);
$('._ooredoo_banner_content_2> div:eq('+ idx +')').fadeIn(200)
}
swiper.on('init', function (el) {
showSliderContent2(el.activeIndex);
});
swiper.on('transitionEnd', function (el) {
if(swiperCurrent2 !== el.activeIndex){
showSliderContent2(el.activeIndex);
swiperCurrent2 = el.activeIndex;
}
});
swiper.init();
Swiper Three
var swiperCurrent3;
var swiper = new Swiper('.swiper-container-3’, {
init: false,
pagination: '.swiper-pagination-3',
nextButton: '.swiper-button-next-3',
prevButton: '.swiper-button-prev-3',
slidesPerView: 3,
centeredSlides: true,
paginationClickable: true,
initialSlide: 2,
spaceBetween: 22,
breakpoints: {
992: {
slidesPerView: 1,
spaceBetween: 10
}
},
runCallbacksOnInit:true
});
function showSliderContent3(idx) {
$('._ooredoo_banner_content_3> div').hide(0);
$('._ooredoo_banner_content_3> div:eq('+ idx +')').fadeIn(200)
}
swiper.on('init', function (el) {
showSliderContent3(el.activeIndex);
});
swiper.on('transitionEnd', function (el) {
if(swiperCurrent3 !== el.activeIndex){
showSliderContent3(el.activeIndex);
swiperCurrent3 = el.activeIndex;
}
});
swiper.init();