Book Image

jQuery Mobile Web Development Essentials-Third Edition - Third Edition

By : Raymond Camden, Andy Matthews
Book Image

jQuery Mobile Web Development Essentials-Third Edition - Third Edition

By: Raymond Camden, Andy Matthews

Overview of this book

jQuery Mobile is a HTML5-based touch-optimized web framework. jQuery Mobile can be used to build responsive cross-platform websites and apps for a wide range of smartphones, tablets, and desktop devices. The jQuery Mobile framework can be integrated with other mobile app frameworks such as PhoneGap, IBM Worklight, and more. Introduction to jQuery Mobile explains how to add the framework to your HTML pages to create rich, mobile-optimized web pages with minimal effort. You’ll learn how to use jQuery Mobile’s automatic enhancements and configure the framework for customized, powerful mobile-friendly websites. We then dig into forms, events, and styling. You'll see how jQuery Mobile automatically enhances content, and will find out how to use the JavaScript API to build complex sites. We’ll introduce you to how jQuery Mobile can be themed as well looking into how JavaScript can be used for deep sets of customizations. The examples are ready to run and can be used to help kick-start your own site. Along the way, you will leverage all the concepts you learn to build three sample mobile applications.
Table of Contents (20 chapters)
jQuery Mobile Web Development Essentials Third Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

jQuery Mobile, links, and you


When jQuery Mobile encounters a simple link (<a href="something.html">Foo</a>), it will automatically capture any clicks on that link and change it to an AJAX-based load. This means that if it detects that the target is something on the same page, that is, the hashmark style (href="#foo") links we used in the previous code, it will handle transitioning the user to a new page. If it detects a page to another file on the same server, it will use AJAX to load the page and replace the currently visible one.

If you link to an external website, then jQuery Mobile will leave the link as it is and the normal link behavior will occur. There may be times when you may want to disable jQuery Mobile from doing anything with your links at all. In this case, you can make use of a data attribute that lets the framework know it shouldn't do anything at all. Here is an example:

<a href="foo.html" data-ajax="false">Normal, non-special link</a>

As we saw in...