How should I do to get the scrolling direction using onScrollStart and not onScrollEnd?
For now, here is the code I found for onScrollEnd :
var current_page = 1;
var old_page = 0;
funnction load() {
myScrollH = new iScroll('wrapper', {
onScrollEnd: function () {
current_page = this.currPageX+1
if(old_page<current_page) {
console.log('right');
}
else if (old_page>current_page) {
console.log('left');
};
old_page=current_page;
}
})
};
load();
If someone has the answer... Tchuss ! V.