Swiper activeIndex issue
See original GitHub issueSwiper activeIndex is not working properly on last-slide, On every callback function it returns second last slide activeIndex number.
I am using swiper 3.3.1 latest version with following code.
$('.sw-' + index).swiper({
nextButton: $(this).find('.swiper-button-next'),
prevButton: $(this).find('.swiper-button-prev'),
pagination: $(this).find('.swiper-pagination'),
slidesPerView: 'auto',
paginationClickable: true,
spaceBetween: 10,
onSlideChangeStart: function (swiper) {
console.log('slidechangeStart: '+swiper.activeIndex);
},
onSlideChangeEnd: function (swiper) {
console.log('slidechangeEnd: ' + swiper.activeIndex);
},
onTransitionEnd: function (swiper) {
console.log('onTransitionEnd: ' + swiper.activeIndex);
},
onInit: function (swiper) {
swiper.update(true);
}
});
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
Top Results From Across the Web
realIndex and activeIndex in useSwiper is not change ... - GitHub
It is surprising that useSwiper does not result in a re-render when the swiper state changes. This makes the hook pretty much useless,...
Read more >How to use " swiper.activeIndex " with if condition?
I am using Swiper.js in my project. I want to know the current active slider. How can I use swiper.activeIndex with an if...
Read more >Swiper API
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
Read more >swiper current index - You.com | The Search Engine You Control
The number of slides, and thus sometimes the activeIndex , is "wrong" by design when loops are involved: https://github.com/nolimits4web/Swiper/issues/1205.
Read more >react-native-web-swiper - npm
The slide automatically gets props.activeIndex and props.index . import React from 'react'; import ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So, How do I know the last slide appear ?
So, How do I know the last slide appear ?