CSS
0
Вклад в тег
const swapFilms = new Swiper(".slider__films", {
navigation: {
nextEl: ".btn__films-next",
prevEl: ".btn__films-prev",
},
<i> init:false,</i>
spaceBetween: 30,
slidesPerView: 5,
});
getResource(' http://localhost:3000/slider__films')
.then(data => {
data.forEach(({img,altimg,cardText,cardName}) => {
new MovieCard(img,altimg,cardText,cardName,'.slider__films .slider__wrapper').render();
});
<i>setTimeout(() => {swapFilms.init();},0); </i>
});
element.classList.add("movie__card");
element.classList.add("swiper-slide");
element.innerHTML = `дальше верстка`