Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new onScrollbarDrag not working #331

Closed
wwannous opened this issue Aug 26, 2013 · 3 comments
Closed

new onScrollbarDrag not working #331

wwannous opened this issue Aug 26, 2013 · 3 comments

Comments

@wwannous
Copy link

i tried setting this as a call back function on a swiper just like onSlideChangeEnd it did not fire on drag. isnt this the way it is supposed to be used. i am using swiper 2.1 and scrollbar 2.1

@nolimits4web
Copy link
Owner

it should be inside of scrollbar parameters:

var s = $('.swiper-container').swiper({
  ....
  scrollbar: {
    onScrollbarDrag: function(){
      //Do something
    }
  }
})

@wwannous
Copy link
Author

thank you for your fast reply but still not firing. what am i doing wrong?

var swiperall = new Swiper('.swiperall', {
pagination : '.pagination1',
loop:false,
grabCursor: true,
keyboardControl: true,
mousewheelControl:true,
mode:'vertical',
scrollbar: {
onScrollbarDrag: function(){
alert("scrolled");
},
container : '.swiper-scrollbar',
draggable : true,
hide: false,
snapOnRelease: true,
noSwiping:true

},
onSlideChangeEnd : function(s) {
updateurl(s.activeIndex)

},

onSlideChangeStart : function(s) {
if (discroll ==1){
swiperall.params.mousewheelControl=false;
}
},
});

@nolimits4web
Copy link
Owner

Hmm, yes, i see, wrong version came with new pull request. Will update it later today

@lock lock bot added the outdated label Jun 27, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jun 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants