Closed soupking closed 9 years ago
I had to shave the < of the html because it's not showing up in the comment box. and I wasn't having any success with Markdown so hopefully this makes sense.
If anybody can point out what I'm not doing right to make the swiping stop I'd be thrilled.
Thanks for reading! :)
var mySwiper = new Swiper('.swiper-container',{
pagination: '.pagination',
loop:false,
grabCursor: true,
paginationClickable: true,
watchActiveIndex: true,
noSwiping: false,
onSlideChangeEnd: function(swiper){
mySwiper.params.noSwiping = true;
}
})
Bingo! That did it! Excellent Vladimir, thanks a bunch!
I didn't know I had to put 'params' in front of the desired option. Not sure if that's pre-defined in JS but I'll use that syntax going forward using Swiper.
Yes, if you need to change some of initial parameters later, you should access swiper.params object
Hi there,
Really am enjoying Swiper. I feel like this is the coolest lightweight plugin since TweenLite. I'm trying to get the swiping to stop after the initial drag. I'm using 2.4.2 as I'm trying to keep my file as light as possible without breaking, but I can't seem to figure out how to place the syntax to get it to function.
This is essentially what I have on the page:
var mySwiper = new Swiper('.swiper-container',{ pagination: '.pagination', loop:false, grabCursor: true, paginationClickable: true, watchActiveIndex: true, noSwipingClass: true, onSlideChangeEnd: function(swiper){ //alert(mySwiper.width); mySwiper.noSwiping = true; } })
div class="device"> div class="swiper-container"> div class="swiper-wrapper"> div class="swiper-slide">