Feature request: persistent headers #4280

Closed
mokesmokes opened this Issue May 3, 2012 · 10 comments

Projects

None yet

3 participants

@mokesmokes

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/

@MauriceG
MauriceG commented May 3, 2012

Hi!
You can use persistent headers the same way like persistent footers.
But take a look at #4260

@mokesmokes

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 :)

@MauriceG
MauriceG commented May 3, 2012

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.

@mokesmokes

Thanks for clarifying.

@MauriceG
MauriceG commented May 3, 2012

Hi @mokesmokes
Take a fresh look: http://jquerymobile.com/test/docs/api/data-attributes.html -> header
The first step is done...
Thanks @agcolom

@agcolom
Member
agcolom commented May 3, 2012

Hi Maurice :-)

You're welcome and THANK YOU ;-)
goodnight Europe ;-)

@MauriceG
MauriceG commented May 3, 2012

Hi Anne :-)
Goodnight UK ;-)

@mokesmokes

Hi Maurice - should I close this issue as a "fixed doc bug", or wait for 1.1.1?

@MauriceG
MauriceG commented May 5, 2012

Hi @mokesmokes !
I think, you can close.
The docs are ok know and persistent headers are also supported.

@mokesmokes

Thanks Maurice, Anne - closed.

@mokesmokes mokesmokes closed this May 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment