custom swiper slider not working (pasting in console works)
-
Have a div with id ‘#yatra_swiper_slider’ when i write the code in console
var swiper = new Swiper('#yatra_swiper_slider', { slidesPerView: 1, autoplay: true, breakpoints: { 640: { slidesPerView: 1, spaceBetween: 15, }, 768: { slidesPerView: 2, spaceBetween: 15, }, 1024: { slidesPerView: 4, spaceBetween: 15, }, }, pagination: { el: '.swiper-pagination', clickable: true, }, navigation: { nextEl: '.swiper-button-next', prevEl: '.swiper-button-prev', }, });
pasting this code in console works and slider start working… but when i write this code in footer.php it says swiper is not defined….
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘custom swiper slider not working (pasting in console works)’ is closed to new replies.