toutes les images ne sont pas resize

This commit is contained in:
Valentin 2024-04-21 18:46:02 +02:00
parent ea8909c5d7
commit 25a022ea48
1 changed files with 6 additions and 8 deletions

View File

@ -20,9 +20,10 @@ $(document).ready(function() {
}
let swiperEl = document.querySelector('.swiper');
if (swiperEl) {
setSwiperHeight(swiperEl);
swiperEl.style.opacity = 1;
setTimeout(() => {
resizeVerticalImages();
}, 100);
}
initSwiper();
barba.init({
@ -48,8 +49,6 @@ $(document).ready(function() {
barba.hooks.after((data) => {
swiperEl = document.querySelector('.swiper');
if (swiperEl) {
setSwiperHeight(swiperEl);
resizeVerticalImages();
if (document.querySelector('.swiper') && !document.querySelector('.swiper-initialized')) {
initSwiper();
body.style.overflowY = "hidden";
@ -58,6 +57,9 @@ $(document).ready(function() {
} else {
body.style.overflowY = "auto";
}
setTimeout(() => {
resizeVerticalImages();
}, 100);
});
})
@ -82,7 +84,3 @@ function resizeVerticalImages() {
}
}
}
function setSwiperHeight(swiperEl) {
console.log(swiperEl);
}