From the course: jQuery Mobile Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Fixed-position toolbars

Fixed-position toolbars - jQuery Mobile Tutorial

From the course: jQuery Mobile Essential Training

Start my 1-month free trial

Fixed-position toolbars

Toolbars by default, scroll with their content if the content gets longer than the screen. And, in this example, I'm going to show you how to make toolbars fixed in position so that that doesn't happen. So, here in the snippets, I've scrolled down in Chapter Four to the Fixed position toolbar setting. And lets open up toolposition_start. Now, before we do anything at all, let's just bring this up in Firefox, and let's scroll the content. And you can see that as I scroll the content, the header and the footer toolbars scroll into position. Now that maybe what you want but, if it isn't, if what you want to have happen is the tool bar stay on the screen while the content scrolls, you can do that using fixed position tool bars. Alright, so let's close this. Let's go back to the snippets. And I'm going to copy this data-position="fixed" statement right here. I'm going to copy that, and then, back in the content, right here on the header, I'm going to paste that on, and I'm going to do the…

Contents