javascript - Use iScroll to create a Picker with the snap-feature -
i'm trying create list looks , feels typical 'picker', means it's normal list fades out @ top , bottom, , there's mask overlay in middle. example
the problem normal list starts first <li>-element on top while should in middle, , scrolling down the last element it's @ bottom while should in middle.
to fix this, implemented padding. after scrolling down , up, padding isn't applied anymore. think has maxscrolly in source code.
has ever tried this, or alternatives?
here's code:
var myscroll = new iscroll('hour-list-wrapper', { snap: "li", momentum: false, vscrollbar: false } );
mobiscroll library make easier you, see demo here http://demo.mobiscroll.com/select/select
if want create custom solution anyway can inspiration in source code.
Comments
Post a Comment