开发者

How do I make the jQuerymobile scrollview snap?

I've been trying to implement a mobile site where the user can swipe throught like homescreens on the iPhone. (like swearch.me)

I just can't figure out how to make the screens/pages snap while scrolling.

开发者_如何学Go

Of course I'm also open for other suggestions on how to accomplish this.

Thx in advance!


I think what you're looking for is the "Scrollview Paging" option in the link you've provided:

Scrollview Paging

A scrollview can be set up so that it scrolls by pages. This feature is only enabled for horizontal or vertical scrollviews. Use data-scroll="xp" or data-scroll="yp" to turn on paging. The following scrollview pages horizontally.

Snap! There you go!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜