let sliderAbout = document.querySelector(".project__slider");
let mySwiper;
function sl() {
if (window.innerWidth > 857) {
mySwiper = new Swiper(sliderAbout, {
observer: true,
observeParents: true,
slidesPerView: 1,
spaceBetween: 50,
speed: 800,
direction: "vertical",
centeredSlides: true,
pagination: {
el: ".swiper-pagination",
type: "bullets",
clickable: true,
},
});
}
if (window.innerWidth < 857) {
mySwiper.destroy();
}
}
sl();
window.addEventListener("resize", () => {
sl();
});
let sliderAbout2 = document.querySelector(".project__slider_mob");
let mySwiper2;
function sl2() {
if (window.innerWidth < 857) {
mySwiper2 = new Swiper(sliderAbout2, {
observer: true,
observeParents: true,
effect: 'fade',
fadeEffect: {
crossFade: true
},
autoplay: {
delay: 1000,
disableOnInteraction: false,
},
spaceBetween: 50,
speed: 800,
centeredSlides: true,
// pagination: {
// el: ".swiper-pagination",
// type: "bullets",
// clickable: true,
// },
});
}
if (window.innerWidth > 857) {
mySwiper2.destroy();
}
}
sl2();
window.addEventListener("resize", () => {
sl2();
});