<div class="wrapper">
<div class="content">
<div class="item">0</div>
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item">5</div>
<div class="item">6</div>
<div class="item">7</div>
<div class="item">8</div>
<div class="item">9</div>
</div>
</div>
var myScroller = new IScroll(document.querySelector('.wrapper'), {
mouseWheel: true,
infiniteElements: '.content .item',
dataset: function(start, count) {
var data = [];
for(var i=0; i<count; i++) {
data.push( start + i );
}
this.updateCache(start, data)
},
dataFiller: function(el, data) {
el.innerHTML = data;
},
cacheSize: 20
});
document.addEventListener('touchmove', function (e) {
e.preventDefault();
}, {
capture: false,
passive: false
});