-
Book Overview & Buying
-
Table Of Contents
jQuery Mobile Cookbook
By :
When a new page is opened in your application, the jQuery Mobile framework provides an option to add a Back button to the header of the page to help you navigate back to the previous page. The Back button is not visible by default. This recipe shows you how to dynamically add and customize the Back button in your application using JavaScript.
Copy the full code of this recipe from the code/03/custom-back-button sources folder. This code can be launched using the URL http://localhost:8080/03/custom-back-button/main.html.
Create main.html and add two anchor links in it. The first link opens a page with a Back button in its header and the second link opens a page without the Back button.
Also add a submit button to the page as shown in the following code:
<div id="main" data-role="page">
<div data-role="header">
<h1>Header of Main Page</h1>
</div>
<div data-role="content">
<a href=...
Change the font size
Change margin width
Change background colour