Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

AutoPlay Slides not working for Swiper JS

$
0
0

I am currently working with svelte to create a smooth auto slider using SwiperJs. It seems that I am unable to create that animation.When loading the page, the autoPlay dosen't seem to work.Below is the add-ons that got me to this :

<Swiper slidesPerView={2}autoplay={{    delay: 1,    disableOnInteraction: false,}}speed={5000}loop={true}pagination={{  clickable: true,}}navigation={true}modules={[Autoplay, Pagination, Navigation]}>

The contents in 3 slides are with different object reffered each time.

<SwiperSlide ><div class="workGridContainer">    {#each workLinks as work}<div class="workCell {work.id}"><img class="workImg" src={work.imageLink} alt={work.id} /><h2 class="gridTitle">{work.title}</h2><p>{work.description}</p><a href={work.source} target="blank">Visit</a></div>    {/each}</div><SwiperSlide />

And I am Importing Modules such as

import { Swiper, SwiperSlide }from "swiper/svelte";import { Autoplay, Pagination, Navigation } from "swiper";

Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>