I use a scrollview to change between pages/forms at a top level and it works fine with animation.
However my first page is not always the same… e.g. when it is the first time that a user logs in it needs to show the Registration page first. In this case want to prevent the scrollview from animating and making the transition instant.
I tried returning false from animation start… but not working.
I tried setting the duration = 0 in the onAnimationStart event but changing properties here does not seem to have any effect.
Indeed, currently there’s no option or parameter to turn of the animation when scrolling to a page.
One possible solution is to disable the animation from CSS when navigating initially.
var contentView = mobiscroll.scrollview('#scrollview', {
layout: 1,
paging: true
});
contentView.navigate(3);
setTimeout(function () {
// Remove the css class which disables the animation
document.getElementById('cont').classList.remove('demo-no-anim');
});