Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering jQuery Mobile

You're reading from   Mastering jQuery Mobile Design and develop cutting-edge mobile web applications using jQuery Mobile to work across a number of platforms

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781783559084
Length 262 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Tools and Testing 3. Mobile Design 4. Call to Action – Our Main Project 5. Navigation 6. Controls and Widgets 7. Working with Data 8. Finishing Touches 9. The Next Level 10. Mobile Best Practices and Efficiency Index

Links and page navigation


When the jQuery Mobile framework encounters a link, it loads up the link in one of the following two ways: Ajax or non-Ajax.

Ajax page linking

By default, whenever you create a link, the framework will automatically load the link using Ajax. By using Ajax, this allows you to have animated page transitions. Again, this is by default, so you don't have to do anything to your link. The framework parses the anchor tag's href attribute and automatically loads the target into the DOM. If it fails, an error message stating Error Loading Page will display briefly on the screen.

Let's go ahead and see an Ajax link in action:

  1. Go to your project and copy (don't move or rename) index.html to a new file named about.html.

  2. Next, edit the link we have for About Us to about.html (remember to do this in the index.html file as well).

  3. Now, change the content div element (<div data-role="content">) of about.html to say this:

    Founded in 2014, Anytown Civic Center plans to be the premier...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image