toutes les images ne sont pas resize
This commit is contained in:
parent
ea8909c5d7
commit
25a022ea48
|
@ -20,9 +20,10 @@ $(document).ready(function() {
|
|||
}
|
||||
let swiperEl = document.querySelector('.swiper');
|
||||
if (swiperEl) {
|
||||
setSwiperHeight(swiperEl);
|
||||
swiperEl.style.opacity = 1;
|
||||
resizeVerticalImages();
|
||||
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);
|
||||
});
|
||||
|
||||
})
|
||||
|
@ -81,8 +83,4 @@ function resizeVerticalImages() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setSwiperHeight(swiperEl) {
|
||||
console.log(swiperEl);
|
||||
}
|
Loading…
Reference in New Issue