Book description
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
Table of contents
- Title Page
- Copyright Page
- Praise for jQuery, jQuery UI, and jQuery Mobile
- Dedication Page
- Contents at a Glance
- Contents
- Preface
- Acknowledgments
- About the Authors
-
Part I: Core
-
Chapter 1. Getting Started with jQuery
- Recipe: Introducing the Basic Usage of jQuery
- Recipe: Using jQuery with Other Libraries
- Recipe: Determining the jQuery Version
- Recipe: Iterating Arrays with each()
- Recipe: Manipulating Arrays by Using map()
- Recipe: Working with Arrays of Elements
- Recipe: Getting the Position of an Element by Using index()
- Recipe: Finding Elements in an Array by Using grep()
- Recipe: Determining the Size of an Element Set by Using length()
- Recipe: Retrieving HTML5 data- Attributes
- Recipe: Storing Element Data by Using data()
- Recipe: Removing Element Data by Using removeData()
- Recipe: Testing and Manipulating Variables
- Recipe: Extending Objects by Using extend()
- Recipe: Serializing the Data in a Form
- Recipe: Testing Browsers for Feature Support
- Summary
-
Chapter 2. Selecting Elements
- Recipe: Combining Two Element Sets by Using add()
- Recipe: Refining the Selection by Using filter()
- Recipe: Selecting Descendants by Using find() and children()
- Recipe: Selecting Elements by Using has() and Testing by Using is()
- Recipe: Selecting Form Elements by Using Pseudo-Selectors
- Recipe: Nesting Selectors
- Recipe: Emulating a CSS Hover Selector
- Recipe: Selecting on Text by Using contains()
- Example: Highlighting a Single Word
- Recipe: Creating Custom Selectors
- Recipe: Scoping the Selection Context
- Summary
-
Chapter 3. Modifying the Page
- Recipe: Adding Classes
- Example: Removing Classes
- Recipe: Generating Class Names
- Recipe: Changing Properties and Attributes
- Recipe: Changing the HTML Contained within an Element
- Recipe: Adding Content by Using append() and appendTo()
- Example: Appending the Outcome of a Function
- Recipe: Adding Content by Using prepend() and prependTo()
- Recipe: Generating HTML Dynamically by Using jQuery
- Recipe: Attaching and Detaching Elements
- Recipe: Copying Elements by Using clone()
- Recipe: Inserting Elements at Specific Positions
- Example: Moving Items Up and Down the List
- Recipe: Removing Elements
- Recipe: Wrapping and Unwrapping Elements
- Summary
-
Chapter 4. Listening and Responding to Events
- Recipe: Listening to Mouse Events
- Example: Drawing on a Canvas
- Recipe: Listening to Keyboard Events
- Recipe: Listening to Form Events
- Recipe: Listening to Scroll Events
- Recipe: Adding Central Event Listeners by Using live() and die()
- Recipe: Delegating Events to Specific Ancestor Elements by Using delegate()
- Recipe: Changing the Execution Context of a Function by Using proxy()
- Summary
-
Chapter 5. Communicating with the Server
- Recipe: Setting Up an Example Server in Node.js
- Recipe: Performing a GET Request
- Recipe: Loading HTML Directly
- Recipe: Handling the Result by Using Promises
- Recipe: Handling Server Errors
- Recipe: Catching Page-not-Found Results
- Recipe: Handling Page Redirects
- Recipe: Setting Request Timeouts
- Recipe: Passing HTTP Headers
- Example: Validating Form Input on the Server Side
- Recipe: Loading XML
- Recipe: Listening to AJAX Events
- Recipe: Reading JSONP from an External Server
- Summary
-
Chapter 1. Getting Started with jQuery
-
Part II: UI
-
Chapter 6. Interacting with the User
- Downloading and Installing jQuery UI
- Recipe: Dragging Elements
- Recipe: Dropping Elements
- Recipe: Changing the Order of Elements by Using Sortable
- Example: Sorting Elements in a Tree Structure
- Recipe: Selecting Elements in an Unordered List
- Example: Selecting Elements in a Tree Structure
- Recipe: Resizing Elements
- Summary
-
Chapter 7. Interacting with Widgets
- Recipe: Grouping Content by Using the Accordion
- Recipe: Suggesting Input Values by Using Autocomplete
- Recipe: Transforming Elements into Buttons
- Example: Styling Radio Buttons by Using a Buttonset
- Recipe: Choosing Dates by Using the Datepicker
- Recipe: Attracting Attention with the Dialog
- Recipe: Displaying Status of a Process by Using the Progressbar
- Recipe: Retrieving Numbers by Using a Slider
- Recipe: Navigating a Page by Using Tabs
- Summary
-
Chapter 6. Interacting with the User
-
Part III: Mobile
-
Chapter 8. Changing the Look and Feel
- Changing the Styling of jQuery UI Components
- Creating Animations by Using jQuery Core
- Recipe: Animating Colors by Using jQuery UI
- Recipe: Hiding Elements by Using Fade and Slide in jQuery Core
- Recipe: Adding Graphical Effects by Using jQuery UI
- Recipe: Animating Addition and Removal of CSS Classes by Using jQuery UI
- Recipe: Displaying all Easing Functions in jQuery UI as Charts
- Recipe: Displaying All Icons in jQuery UI
- Recipe: Executing Code at the End of an Animation with a Promise
- Recipe: Executing Code Within Animations by Using Queue and Dequeue
- Summary
-
Chapter 9. Navigating Pages by Using jQuery Mobile
- Recipe: Setting Up jQuery Mobile Basics
- Recipe: Serving Multiple Pages from a Single HTML File
- Recipe: Changing the Title Element
- Recipe: Loading External Pages Using AJAX
- Recipe: Displaying Page Loading Messages
- Recipe: Linking to External Pages without AJAX
- Recipe: Specifying the Transition Animation
- Recipe: Specifying Custom Transition Animations
- Recipe: Listening to Mobile Events
- Recipe: Generating Back Buttons
- Recipe: Adding Footers to the Bottom of the Page
- Recipe: Fixing the Footer Across Pages
- Recipe: Keeping the Footer in a Fixed Position
- Recipe: Hiding and Showing the Footer
- Recipe: Optimizing Headers and Footers for Fullscreen View
- Recipe: Changing Color Schemes with Themes
- Recipe: Using Multiple Columns
- Recipe: Changing Pages by Using JavaScript Calls
- Recipe: Loading Pages by Using JavaScript Calls
- Recipe: Attaching Data to DOM Nodes in jQuery Mobile
- Recipe: Utilizing jQuery Mobile Helper Functions
- Summary
-
Chapter 10. Interacting with jQuery Mobile
- Recipe: Displaying Toolbars Inline in Content
- Recipe: Displaying a Warning Bar
- Recipe: Adding Menu Bars to Footer Elements
- Recipe: Navigating with a Navigation Bar
- Recipe: Showing and Hiding Elements by Using Collapsible
- Recipe: Adding Accordion Behavior by Using Collapsible Sets
- Recipe: Acquiring Basic Text Input by Using Form Fields
- Recipe: Acquiring Calendar-Based Input
- Recipe: Displaying Input Fields by Using Alternative Keyboards
- Recipe: Displaying Specialized Input Fields
- Recipe: Acquiring Integers by Using Sliders
- Recipe: Setting Binaries with Flip Switches
- Recipe: Selecting a Single Element by Using Radio Buttons
- Recipe: Selecting Multiple Elements by Using Check Boxes
- Recipe: Selecting Elements from Drop-Down Lists
- Recipe: Displaying Native Forms by Using jQuery Mobile Off
- Recipe: Displaying Lists of Elements
- Recipe: Filtering List Elements
- Recipe: Grouping Form Elements in Lists
- Summary
-
Chapter 8. Changing the Look and Feel
-
Part IV: Plugins
-
Chapter 11. Creating Plugins
- Recipe: Setting Up a Simple Static Plugin
- Recipe: Creating Simple Context-Aware Plugins
- Recipe: Chaining jQuery Functions and Plugins
- Recipe: Parameterizing Plugins
- Recipe: Providing Default Parameters
- Recipe: Operating the Plugin by Using Methods
- Recipe: Creating a Plugin that Creates Plugins
- Recipe: Registering and Invoking Callback Functions
- Recipe: Passing Context to Callback Functions
- Recipe: Returning Deferred Objects to Call Separate Callbacks on Success and on Error
- Recipe: Returning a Promise to Protect Internals
- Recipe: Demonstrating the Promise(d) Protection
- Recipe: Using Promise to Control Flow Structures
- Recipe: Visualizing Progress Before the Final Callback
- Recipe: Providing Context to Callback Functions
- Recipe: Providing a Context to Progress Functions
- Summary
-
Chapter 12. Working with Third-Party Plugins
- Recipe: Displaying a Modal
- Recipe: Using a Drop-Down Menu
- Recipe: Using ScrollSpy
- Recipe: Toggling Tabs
- Recipe: Adding Tooltips
- Recipe: Adding a Popover
- Recipe: Alerting the User
- Recipe: Button Control
- Recipe: Collapsing Content
- Recipe: Putting Content in a Carousel
- Recipe: Using typeahead for Autocomplete
- Summary
-
Chapter 11. Creating Plugins
- Index
Product information
- Title: jQuery, jQuery UI, and jQuery Mobile: Recipes and Examples
- Author(s):
- Release date: November 2012
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780132981378
You might also like
book
jQuery UI in Action
jQuery UI in Action is a practical guide to using and customizing jQuery UI library components …
book
Beginning jQuery
Beginning jQuery is your step-by-step guide to learning the jQuery library. jQuery is the most popular …
book
Mastering jQuery UI
Become an expert in creating real-world Rich Internet Applications using the varied components of jQuery UI …
book
jQuery UI
With the jQuery UI library, you can apply the power and standards of jQuery to user …