document.addEventListener('DOMContentLoaded', function () {
function updateSwiper() {
document.querySelectorAll('.swiper').forEach(function(el) {
if (el.swiper) {
el.swiper.params.autoHeight = true;
el.swiper.updateAutoHeight(300);
el.swiper.update();
}
});
}
setTimeout(updateSwiper, 500);
new MutationObserver(function () {
updateSwiper();
}).observe(document.body, {
subtree: true,
childList: true
});
});