Home > Store

jQuery, jQuery UI, and jQuery Mobile, Rough Cuts: Recipes and Examples

Rough Cuts

  • Available to Safari Subscribers
  • About Rough Cuts
  • Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.

Not for Sale

About

Features


Description

  • Copyright 2013
  • Dimensions: 7" x 9"
  • Pages: 400
  • Edition: 1st
  • Rough Cuts
  • ISBN-10: 0-13-298132-7
  • ISBN-13: 978-0-13-298132-3

This is the Rough Cut version of the printed book.

100+ Practical jQuery Recipes for Solving Your Real-World Web and Mobile Development Challenges!

 

jQuery makes it easier than ever for developers to build exceptionally robust, cross-platform websites and mobile apps. jQuery, jQuery UI, and jQuery Mobile: Recipes and Examples is a practical “cookbook,” packed with realistic, easy-to-use solutions for making the most of jQuery Core, jQuery UI, plugins, and jQuery Mobile.

This guide brings together more than one hundred self-contained, downloadable examples, each with an in-depth explanation of how the code works and how to adapt it for your own needs. Pioneering web/mobile developers Adriaan de Jonge and Phil Dutson present examples you can apply immediately in virtually any web or mobile app, and with any server-side platform, including PHP, .NET, Java, Ruby, Node.js, or Python. This extremely useful guide will help you 

  • Test browser support and provide for graceful degradation
  • Fine-tune DOM element selection and manipulate your site’s DOM structure
  • Master the newest techniques for event handling and binding
  • Communicate with web servers: AJAX, page errors, redirects, XML, and more
  • Use advanced UI widgets, from accordions and autocomplete to sliders and tabs
  • Build mobile-optimized sites with the jQuery Mobile library
  • Write and smoothly incorporate new plugins
  • Integrate powerful third-party plugins, such as the Twitter Bootstrap framework 

The authors’ proven “code first, explain later” approach supports developers at all levels who want to start experimenting immediately. Their exceptionally readable examples never take shortcuts or compromise quality,and their detailed walk-throughs are ideal for anyone who wants to thoroughly understand their code. If you have a working knowledge of HTML, CSS, and basic JavaScript, you’ll feel right at home immediately; if not, de Jonge and Dutson’s careful explanations and full HTML page layout examples will get you up to speed quickly.

Covers jQuery 1.6.4 and 1.7, with Tips for 1.8

Sample Content

Table of Contents

Preface xix

Acknowledgments xxiii

About the Author xxv

 

Part I: Core 1

 

Chapter 1: Getting Started with jQuery 3

Recipe: Introducing the Basic Usage of jQuery 3

Recipe: Using jQuery with Other Libraries 6

Recipe: Determining the jQuery Version 7

Recipe: Iterating Arrays with each() 8

Recipe: Manipulating Arrays by Using map() 9

Recipe: Working with Arrays of Elements 10

Recipe: Getting the Position of an Element by Using index() 12

Recipe: Finding Elements in an Array by Using grep() 13

Recipe: Determining the Size of an Element Set by Using length() 14

Recipe: Retrieving HTML5 data- Attributes 15

Recipe: Storing Element Data by Using data() 16

Recipe: Removing Element Data by Using removeData() 18

Recipe: Testing and Manipulating Variables 19

Recipe: Extending Objects by Using extend() 22

Recipe: Serializing the Data in a Form 24

Recipe: Testing Browsers for Feature Support 25

Summary 26

Chapter 2: Selecting Elements 27

Recipe: Combining Two Element

Sets by Using add() 27

Recipe: Refining the Selection by Using filter() 28

Recipe: Selecting Descendants by Using find() and children() 29

Recipe: Selecting Elements by Using

has() and Testing by Using is() 31

Recipe: Selecting Form Elements by

Using Pseudo-Selectors 32

Recipe: Nesting Selectors 33

Recipe: Emulating a CSS Hover Selector 34

Recipe: Selecting on Text by Using contains() 35

Example: Highlighting a Single Word 36

Recipe: Creating Custom Selectors 37

Recipe: Scoping the Selection Context 39

Summary 40

Chapter 3: Modifying the Page 41

Recipe: Adding Classes 41

Example: Removing Classes 42

Recipe: Generating Class Names 43

Recipe: Changing Properties and Attributes 45

Recipe: Changing the HTML Contained within an Element 46

Recipe: Adding Content by Using append() and appendTo() 48

Example: Appending the Outcome of a Function 49

Recipe: Adding Content by Using prepend() and prependTo() 50

Recipe: Generating HTML Dynamically

by Using jQuery 51

Recipe: Attaching and Detaching Elements 53

Recipe: Copying Elements by Using clone() 54

Recipe: Inserting Elements at Specific Positions 56

Example: Moving Items Up and Down the List 58

Recipe: Removing Elements 60

Recipe: Wrapping and Unwrapping Elements 61

Summary 64

Updates

Submit Errata

More Information