You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
908 B
45 lines
908 B
'use strict';
|
|
|
|
const gymSwiper = new Swiper('.gym-swiper', {
|
|
direction: 'horizontal',
|
|
breakpoints: {
|
|
320:{
|
|
slidesPerView: 1.20,
|
|
spaceBetween: 24,
|
|
},
|
|
996: {
|
|
slidesPerView: 3
|
|
},
|
|
}
|
|
});
|
|
|
|
|
|
|
|
const reviewsSwiper = new Swiper('.reviews-swiper', {
|
|
spaceBetween: 24,
|
|
// If we need pagination
|
|
pagination: {
|
|
el: '.swiper-pagination',
|
|
},
|
|
|
|
// Navigation arrows
|
|
navigation: {
|
|
nextEl: '.swiper-button-next',
|
|
prevEl: '.swiper-button-prev',
|
|
},
|
|
|
|
// And if we need scrollbar
|
|
scrollbar: {
|
|
el: '.swiper-scrollbar',
|
|
},
|
|
runCallbacksOnInit: true,
|
|
// === new change
|
|
on: {
|
|
slideChange: function(){
|
|
let offer = document.querySelector('#numberReviews');
|
|
offer.innerHTML = (this.activeIndex + 1);
|
|
}
|
|
}
|
|
})
|
|
|
|
// gymSwiper.destroy();
|
|
|