1. About the callback function of iscroll? Let me first ask if this framework has a callback function?
2. How to trigger other functions after myscroll.scrollTo(0,10,200,true) is completed? How to write?
3. Just like the takeout example, after the scroll on the right is completed, the menu on the left also scrolls to the corresponding position. Wait online! There is a bug in the height when I use swiper. The content of each screen is different (the content is high and low. ) cannot roll to the specified target position,
is always misaligned
世界只因有你2017-07-05 10:48:43
The callback function is not clear, I did it by monitoring events
myScroll = new IScroll('#wrapper');
myScroll.on('scrollEnd', doSomething);
The events that can be linked to are as follows:
beforeScrollStart, triggered when the user touches the screen but has not yet started scrolling.
scrollCancel, scrolling initialization is completed but not executed.
scrollStart, start scrolling
scroll, triggered when the content is scrolled, only valid in scroll-probe.js version, please refer to onScroll event.
scrollEnd, triggered when scrolling stops.
flick, user opens left/right.
zoomStart, start zooming.
zoomEnd, zoom ends.
Your content area may have changed (for example, there are pictures). At this time, you need to reload
downiscroll
ajax('page.php', onCompletion);
function onCompletion () {
// Update here your DOM
setTimeout(function () {
myScroll.refresh();
}, 0);
};