The framework defines the attribute "data-id" only for footer elements (see http://jquerymobile.com/demos/1.1.0/docs/api/data-attributes.html) , and of course it is often desired to have persistent headers (in particular - navbars) as well. Indeed when I tried to use data-id with headers and navbars in the headers, the content div was positioned way too high on the page (its top was obscured by the navbar). Strangely, this wrong positioning occurs on desktop browsers (Chrome & FF tested) but not on mobile Safari.... See the following fiddle, and what happens in the first transition from page One to page Two: http://jsfiddle.net/mokesmokes/9rSRk/2/
You can use persistent headers the same way like persistent footers.
But take a look at #4260
I guess I hit this bug in the header navbar, as shown by my fiddle above. But why do the docs specify data-id for the footers only? Is this a doc bug or intentional? If intentional - then my original feature request stands :)
You hit this issue because your header is higher as a "standard" header.
And you're right of course, the data-idof headers is missing at the attribute reference (I hope it is on the way now: #4282)
But also take a look at http://jquerymobile.com/test/docs/toolbars/footer-persist-d.html
To tell the framework to apply the persistent behavior, add the same data-id attribute to the header and/or footer of all HTML pages in the navigation.
Thanks for clarifying.
Take a fresh look: http://jquerymobile.com/test/docs/api/data-attributes.html -> header
The first step is done...
Hi Maurice :-)
You're welcome and THANK YOU ;-)
goodnight Europe ;-)
Hi Anne :-)
Goodnight UK ;-)
Hi Maurice - should I close this issue as a "fixed doc bug", or wait for 1.1.1?
Hi @mokesmokes !
I think, you can close.
The docs are ok know and persistent headers are also supported.
Thanks Maurice, Anne - closed.