javascript - How to detect scroll down on a touch device using jQuery? -


i have infinite scroll method gets called so:

$(window).on('scroll resize load', function() {     // execute infinite scroll method }); 

so gets executed under following events:

scroll resize  load 

but doesn't work in iphone (and possible other touch devices).

this responsive site have no need use jquery mobile or like. tried use standalone plugin:

http://www.netcu.de/jquery-touchwipe-iphone-ipad-library

but plugin , others have called so:

$(window).touchwipe({      wipedown: function() {         // execute infinite scroll method      } }); 

but means have have 2 versions of code. looking can add existing code:

$(window).on('scroll resize load new_event_here', function() { 

how that?

you have them call same function.

var infinitescrollmethod=function() {       // execute infinite scroll method } $(window).on('scroll resize load', infinitescrollmethod).touchwipe({     wipedown: infinitescrollmethod }); 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -