I am trying to develop an iPhone app using PhoneGap and jQuery Mobile. This app has a Fixed Footer.
The main problem I’m facing right now is that the built-in page transition changes THE WHOLE PAGE, requiring me to copy/paste the footer code in every page.
Obviously, this is not the way to do it. Any small change in the footer has to be duplicated 10+ times (for 10+ pages).
My question is as follows: how can I load just the “content” part of the page (with a slide transition) so I wont have to have to footer code in all of my pages?
That functionality is not yet available in jQuery Mobile. You can turn on the
touchOverflowEnabledoption for “real” fixed-footers and fixed-headers on iOS 5 devices but not for any other devices.Source: http://jquerymobile.com/demos/1.0/docs/toolbars/bars-fixed.html
You can however setup your footers in a programmatic manor rather than hard-coding each page:
Here is a demo: http://jsfiddle.net/vNqaG/ (Notice there are no hard-coded footers in the HTML pane)