Book Image

jQuery Mobile Web Development Essentials - Second Edition

By : Raymond Camden, Andy Matthews
Book Image

jQuery Mobile Web Development Essentials - Second Edition

By: Raymond Camden, Andy Matthews

Overview of this book

<p>jQuery Mobile is a unified, HTML5-based user interface system for all popular mobile device platforms. It is the most practical HTML/JavaScript framework available today. In this tutorial, you will learn how to use jQuery Mobile with your HTML pages, and create mobile friendly websites in no time.</p> <p>jQuery Mobile Web Development Essentials - Second Edition will explain how to add the framework to your HTML pages to create rich, mobile optimized web pages with minimal effort. By using simple data attributes, you can quickly create mobile pages and other widgets. You'll see how each widget works, with the help of detailed examples and screenshots.</p> <p>jQuery Mobile Web Development Essentials - Second Edition is packed with examples that will help you become a pro at mobile web development. We will begin with simple HTML, and quickly enhance it using jQuery Mobile for incredible mobile optimized sites.</p> <p>We start off by learning the building blocks of jQuery Mobile’s component driven design. We then dig into forms, events, and styling. You'll see how jQuery Mobile automatically enhances content, and learn how to use the JavaScript API for building complex sites. Along the way, we will leverage all these concepts, and build three sample mobile applications.</p>
Table of Contents (20 chapters)
jQuery Mobile Web Development Essentials Second Edition
Credits
About the Authors
About the Reviewers
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 hash-mark style (href="#foo") links we used previously, 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 site, then jQuery Mobile will leave the link as it is, and the normal link behavior will occur. There may be times when you want to disable jQuery Mobile from doing anything with your links at all. In that case, you can make use of a data attribute that lets the framework know it shouldn't do anything at all. An example:

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

As we saw in Chapter 1, Preparing Your...