开发者

scrollview for jQuery mobile tollbars *not* to be fixed

开发者 https://www.devze.com 2023-03-03 17:42 出处:网络
I have been using scrollview (http://jquerymobile.com/test/experiments/scrollview/) successfully for an image gallery left/right swipe (which looks great) however the header/footer are always persiste

I have been using scrollview (http://jquerymobile.com/test/experiments/scrollview/) successfully for an image gallery left/right swipe (which looks great) however the header/footer are always persistent and I cant work out looking at the cod开发者_如何学Goe or looking online a way for these to be inline rather then fixed (like the default jQuery mobile setup).

Any ideas? Or have I missed something obvious?

Many thanks.


Change <div data-role="header" data-position="fixed"> into <div data-role="header"> in your html and it should be enough.

[edit]

Ok, It's not enough.

Scrollview plugin scrolls the area of a HTML element that it's applied to, so to scroll the whole page instead of a div in the content, you would have to put data-scroll="true" attribute in the page div.

I hereby declare, that I didn't test if it is supported by the scrollview plugin. ;)

0

精彩评论

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