I am making a website using jQuery Mobile.
How to keep jquery mobile header and footer fixed? I just want only the content to scroll(just like it happens in iPhone applications), and keep the headers and footers fixed at top and bottom.
Any suggestions ?
Add this attribute to your header/footer div:
<div data-role="header" data-position="fixed">
<h1>Header Page 1</h1>
</div>
Also, you might have a look at this: http://jquerymobile.com/test/docs/toolbars/footer-persist-a.html
The issue I had with jquery mobile fixed is that the header and footer fade. I imagine this is something that they will correct in the future but in addition to iscroll suggested by Dan, there is also jquery mobile scrollview and wink toolkit. I had good results with jquery mobile scrollview but no luck with iscroll or wink
1) Jquery mobile Scrollview
2) Wink Toolkit
Another option is check out iScroll: http://cubiq.org/iscroll