O'Reilly logo

jQuery Mobile Web Development Essentials Second Edition by Andy Matthews, Raymond Camden

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding headers

You've already worked with headers in the previous chapter, so the code will be familiar. In this chapter, we will study them deeper and demonstrate how to add additional functionality, such as buttons, to your site headers.

If you remember, a header can be defined by simply using a div with the appropriate role:

<div data-role="header"><h1>My Header</h1></div>

We can further add functionality to headers by adding buttons. Buttons could be used for navigation (for example, to return to the home screen), or to provide links to related pages. Because the center of the header is used for text, there are only two spaces available for buttons—one to the left and one to the right. Buttons can be added simply by creating links in your header. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required