stephband / jquery.event.swipe

jQuery custom events swipeleft, swiperight, swipeup and swipedown
stephband.info/jquery.event.swipe
446 stars 180 forks source link

No more scroll when binding to body #9

Closed vinzentt closed 11 years ago

vinzentt commented 11 years ago

Hi,

first of all thanks for this plugin.

I have a strange behaviour, when I bind to the body element swipeleft and swiperight this way:

 $('body').bind('swipeleft', function(){
         alert('swipeleft')
});
$('body').bind('swiperight', function(){
        alert('swiperight')
});

scroll is no more working on my page (only on ios device) and no alert launched.

Anyone ever experienced this?

Thanks

stephband commented 11 years ago

This behaviour is normal. Did you read the bit about scrolling in the documentation?

http://stephband.info/jquery.event.swipe/#scroll

vinzentt commented 11 years ago

Oh sorry didn't read this part. Just a remark, if I unbind these listeners using jquery on/off, my page is still not scrolling... Is it expected as well?