Adding Navigation Buttons

<a href="#page2" data-role="button">Page2</a> <a href="hour2201-page3.html" data-role="button">Page</a>

Navigation buttons are links to other mobile pages. Typically, navigation buttons are added to the header or footer element for easy visibility. However, you can also place them inside the mobile content.

Navigation buttons are created by adding the data-role="button" attribute to an <a> link. The href attribute should point to the hash tag or URL of the mobile page you want to switch to. The following code shows the syntax for defining an <a> tag as a navigation link for a local link:

<a href="#page2" data-role="button">Page2</a>

The following code ...

Get jQuery and JavaScript Phrasebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.