Book Image

Mastering jQuery

By : Alex Libby
Book Image

Mastering jQuery

By: Alex Libby

Overview of this book

<p>Mastering jQuery has been written not only to help maximize your skills with core functionality in the library, but also to explore some of the more intriguing ways of using the library to achieve real-world solutions that could feature on any website or online environment.</p> <p>You'll start with a look at some of the more advanced ways to incorporate the library into your pages, followed by working with forms and advanced form validation using regular expressions. Next you'll move on to animating in jQuery, advanced event handling, and using jQuery effects.</p> <p>Finally, you will develop practical examples of using jQuery with external functionality such as node-webkit, before finishing with a session on optimizing your version of the library for maximum efficiency and exploring best practices for using QUnit.</p>
Table of Contents (21 chapters)
Mastering jQuery
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Animating content for mobile devices


So far, we've considered the use of jQuery to animate content on responsive sites, but what about the mobile platform? There has been a significant increase in the use of non-desktop devices (such as laptops and smartphones) to view content. This brings some additional considerations that we need to make in order to make the most of performance on mobile devices.

Animating on a mobile platform is less about writing code but more about deciding which technologies to use; in most cases, simply writing jQuery code will work, but it won't be as effective as it should be.

The secret behind getting the best experience is in the use of the smartphone's GPU or Graphics Processing Unit; to do this, we can offload standard jQuery animations (which are slower) by enabling 3D rendering.

Tip

Although this browser should work on all desktop and mobile devices, you will get best results in a WebKit-based browser, such as Google Chrome.

Let's explore this in more detail with...