question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why my swiper slide from the last slide?

See original GitHub issue

Without setting the initialSlide, my swiper always slide from the last slide. As I set it to 1, it works (Slide from the first slide). Why not Zero.

swiperOption: {
    pagination: '.swiper-pagination',
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    slidesPerView: 1,
    paginationClickable: true,
    spaceBetween: 30,
    loop: true,
    autoplay: 3000,
    autoplayDisableOnInteraction: false
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hgawaitcommented, Aug 19, 2017

My solution is: swiperOption: { … initialSlide: 1 }

3reactions
simone-sanfratellocommented, Aug 4, 2017

I had same problem, fixed with

swiperOption: {
        ...
        onInit: function (swiper) {
          swiper.slideTo(1)
        }

@surmon-china thanks for this great plugin

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swiper slide - showing last slide 100% - Stack Overflow
For the 1,2 slider show 100% and 3 slide with 60% and move two slide at a time. For last slide show only...
Read more >
Swiper API
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Read more >
swiper get index of slide | The AI Search Engine You Control
I have a Swiper Slider that use "loop" property. The matter is, if my swiper completes a full lap, after last slide (third...
Read more >
Using .last() to check if we're on the last slide - Codecademy
... use the jQuery method `.last()` to check if the current slide is the last slide. ... For my test I added a...
Read more >
SwiperJS - Tips and Good Practice - OXYGEN4FUN
The next and previous slides will have an opacity of 1 and will be grey. .swiper-slide img { opacity: 0.1; transition ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found