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 } );

http://jsfiddle.net/2kbdv/3

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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -