Amaze UI use iScroll lite
(version 5.1.3) by default. More details in Official Website。
iscroll-lite.js, it is a stripped down version of the main script. It doesn't support snap, scrollbars, mouse wheel, key bindings. But if all you need is scrolling (especially on mobile) iScroll lite is the smallest, fastest solution.
Use $.AMUI.iScroll
to construct IScroll
instance.
<div id="wrapper">
<ul>
<li>...</li>
<li>...</li>
...
</ul>
</div>
var IScroll = $.AMUI.iScroll;
var myScroll = new IScroll('#wrapper');
iScroll is used to smooth the vertical and horizontal drag operations and controls.
Most of iScroll examples can be found on internet is based on iScroll 4. However, iScroll API changed a lot in 5.x
version, so many 4.x
examples don't work with 5.x
iScroll.
More examples in Repo Homepage,Attension: iScroll in Amaze UI is lite
version. Some Demo may not work with Amaze UI.
Add click: true
when initializing iScroll, and the problem will be solved (credit to FB总司令)。
var myScroll = new IScroll('#wrapper', {
click: true
});