プロジェクトで iscroll を使用しています。iscroll ライブラリを使用してユーザー スクロール ID が可能なときに、一度に 3 つの項目をスクロールしたいですか?既に scrollTo を試みましたが、動作しませんか?
これが私のフィドルです。 http://jsfiddle.net/amnishyadav/dWYJS/
var isScrolling = false;
myScroll = new iScroll('headerWrapper',{
snap: 'li',
hScrollbar: false,
vScrollbar: false,
momentum: true,
vScroll: false,
onScrollMove : function(e){
// clearHeaderInterval();
// myScroll.scrollTo(50, 0);
// myScroll.refresh();
console.log('onScrollMove===============>>>>>>>>>>>>>');
isScrolling = true;
// here get the device type and version
if(deviceType() == 'android'){
var deviceVersion = device.version;
console.log(" deviceType is ===>>"+deviceVersion);
if(deviceVersion=='4.1' || deviceVersion=='4.1.1'|| deviceVersion=='4.1.2'){
console.log("android version is ===>>"+deviceVersion);
setTimeout(function(){
myScroll.refresh();
}, 1000);
}
}
// setTimeout(function(){myScroll.refresh();},0);
},
});