-
Book Overview & Buying
-
Table Of Contents
jQuery Mobile Cookbook
By :
When you write a login page in your app, once the user enters valid credentials, you will want to redirect the user to a different page or to a different folder on success. This recipe shows you how to redirect the user to a different page during a login page navigation scenario, by using the data-url attribute.
Copy the full code of this recipe from the code/02/data-url sources folder. You can launch this code using the URL http://localhost:8080/02/data-url/login/main.html.
The steps to be followed are:
Create two folders called login and records. The login folder will contain main.html, and the records folder will contain the index.html and data.html files.
In the login folder, create main.html as a multi-page document. Here, first add the #main page as shown in the following code snippet. Also add a link to open the #login page.
<div data-role="page" id="main">
<div data-role="header">
<h1...
Change the font size
Change margin width
Change background colour