Wednesday, November 7, 2012

Jquery Cookbook

Overview
This jQuery book is from the cookbook series, good for both newcomers and professionals, professionals can skip the initial basic chapters, while for new comers the initial chapters give the foundation. The later part of the book covers concepts like jQuery UI, JSON etc. The last chapter gives inputs on how to test applications using jQuery.

Ideal for newcomers and JavaScript veterans alike, jQuery Cookbook starts with the basics and then moves to practical use cases with tested solutions to common web development hurdles. You also get recipes on advanced topics, such as methods for applying jQuery to large projects.

Title
jQuery Cookbook
Author
Jquerty Community
Publisher
O'Reilly
Publishing Date
2010
Pages
528
Price
Rs. 725/-





Table of Contents

Chapter 1 jQuery Basics

Introduction

Including the jQuery Library Code in an HTML Page

Executing jQuery/JavaScript Coded After the DOM Has Loaded but Before Complete Page Load

Selecting DOM Elements Using Selectors and the jQuery Function

Selecting DOM Elements Within a Specified Context

Filtering a Wrapper Set of DOM Elements

Finding Descendant Elements Within the Currently Selected Wrapper Set

Returning to the Prior Selection Before a Destructive Change

Including the Previous Selection with the Current Selection

Traversing the DOM Based on Your Current Context to Acquire a New Set of DOM Elements

Creating, Operating on, and Inserting DOM Elements

Removing DOM Elements

Replacing DOM Elements

Cloning DOM Elements

Getting, Setting, and Removing DOM Element Attributes

Getting and Setting HTML Content

Getting and Setting Text Content

Using the $ Alias Without Creating Global Conflicts


Chapter 2
 Selecting Elements with jQuery

Introduction

Selecting Child Elements Only

Selecting Specific Siblings

Selecting Elements by Index Order

Selecting Elements That Are Currently Animating

Selecting Elements Based on What They Contain

Selecting Elements by What They Don’t Match

Selecting Elements Based on Their Visibility

Selecting Elements Based on Attributes

Selecting Form Elements by Type

Selecting an Element with Specific Characteristics

Using the Context Parameter

Creating a Custom Filter Selector


Chapter 3
 Beyond the Basics

Introduction

Looping Through a Set of Selected Results

Reducing the Selection Set to a Specified Item

Convert a Selected jQuery Object into a Raw DOM Object

Getting the Index of an Item in a Selection

Making a Unique Array of Values from an Existing Array

Performing an Action on a Subset of the Selected Set

Configuring jQuery Not to Conflict with Other Libraries

Adding Functionality with Plugins

Determining the Exact Query That Was Used


Chapter 4
 jQuery Utilities

Introduction

Detecting Features with jQuery.support

Iterating Over Arrays and Objects with jQuery.each

Filtering Arrays with jQuery.grep

Iterating and Modifying Array Entries with jQuery.map

Combining Two Arrays with jQuery.merge

Filtering Out Duplicate Array Entries with jQuery.unique

Testing Callback Functions with jQuery.isFunction

Removing Whitespace from Strings or Form Values with jQuery.trim

Attaching Objects and Data to DOM with jQuery.data

Extending Objects with jQuery.extend


Chapter 5
 Faster, Simpler, More Fun

Introduction

That’s Not jQuery, It’s JavaScript!

What’s Wrong with $(this)?

Removing Redundant Repetition

Formatting Your jQuery Chains

Borrowing Code from Other Libraries

Writing a Custom Iterator

Toggling an Attribute

Finding the Bottlenecks

Caching Your jQuery Objects

Writing Faster Selectors

Loading Tables Faster

Coding Bare-Metal Loops

Reducing Name Lookups

Updating the DOM Faster with .innerHTML

Debugging? Break Those Chains

Is It a jQuery Bug?

Tracing into jQuery

Making Fewer Server Requests

Writing Unobtrusive JavaScript

Using jQuery for Progressive Enhancement

Making Your Pages Accessible


Chapter 6
 Dimensions

Introduction

Finding the Dimensions of the Window and Document

Finding the Dimensions of an Element

Finding the Offset of an Element

Scrolling an Element into View

Determining Whether an Element Is Within the Viewport

Centering an Element Within the Viewport

Absolutely Positioning an Element at Its Current Position

Positioning an Element Relative to Another Element

Switching Stylesheets Based on Browser Width


Chapter 7
 Effects

Introduction

Sliding and Fading Elements in and out of View

Making Elements Visible by Sliding Them Up

Creating a Horizontal Accordion

Simultaneously Sliding and Fading Elements

Applying Sequential Effects

Determining Whether Elements Are Currently Being Animated

Stopping and Resetting Animations

Using Custom Easing Methods for Effects

Disabling All Effects

Using jQuery UI for Advanced Effects


Chapter 8
 Events

Introduction

Attaching a Handler to Many Events

Reusing a Handler Function with Different Data

Removing a Whole Set of Event Handlers

Triggering Specific Event Handlers

Passing Dynamic Data to Event Handlers

Accessing an Element ASAP (Before document.ready)

Stopping the Handler Execution Loop

Getting the Correct Element When Using event.target

Avoid Multiple hover() Animations in Parallel

Making Event Handlers Work for Newly Added Elements


Chapter 9
 Advanced Events

Introduction

Getting jQuery to Work When Loaded Dynamically

Speeding Up Global Event Triggering

Creating Your Own Events

Letting Event Handlers Provide Needed Data

Creating Event-Driven Plugins

Getting Notified When jQuery Methods Are Called

Using Objects’ Methods as Event Listeners


Chapter 10
 HTML Form Enhancements from Scratch

Introduction

Focusing a Text Input on Page Load

Disabling and Enabling Form Elements

Selecting Radio Buttons Automatically

(De)selecting All Checkboxes Using Dedicated Links

(De)selecting All Checkboxes Using a Single Toggle

Adding and Removing Select Options

Autotabbing Based on Character Count

Displaying Remaining Character Count

Constraining Text Input to Specific Characters

Submitting a Form Using Ajax

Validating Forms


Chapter 11
 HTML Form Enhancements with Plugins

Introduction

Validating Forms

Creating Masked Input Fields

Autocompleting Text Fields

Selecting a Range of Values

Entering a Range-Constrained Value

Uploading Files in the Background

Limiting the Length of Text Inputs

Displaying Labels Above Input Fields

Growing an Input with Its Content

Choosing a Date


Chapter 12
 jQuery Plugins

Introduction

Where Do You Find jQuery Plugins?

When Should You Write a jQuery Plugin?

Writing Your First jQuery Plugin

Passing Options into Your Plugin

Using the $ Shortcut in Your Plugin

Including Private Functions in Your Plugin

Supporting the Metadata Plugin

Adding a Static Function to Your Plugin

Unit Testing Your Plugin with QUnit


Chapter 13
 Interface Components from Scratch

Introduction

Creating Custom Tool Tips

Navigating with a File-Tree Expander

Expanding an Accordion

Tabbing Through a Document

Displaying a Simple Modal Window

Building Drop-Down Menus

Cross-Fading Rotating Images

Sliding Panels


Chapter 14
 User Interfaces with jQuery UI

Introduction

Including the Entire jQuery UI Suite

Including an Individual jQuery UI Plugin or Two

Initializing a jQuery UI Plugin with Default Options

Initializing a jQuery UI Plugin with Custom Options

Creating Your Very Own jQuery UI Plugin Defaults

Getting and Setting jQuery UI Plugin Options

Calling jQuery UI Plugin Methods

Handling jQuery UI Plugin Events

Destroying a jQuery UI Plugin

Creating a jQuery UI Music Player


Chapter 15
 jQuery UI Theming

Introduction

Styling jQuery UI Widgets with ThemeRoller

Overriding jQuery UI Layout and Theme Styles

Applying a Theme to Non-jQuery UI Components

Referencing Multiple Themes on a Single Page

Appendix: Additional CSS Resources


Chapter 16
 jQuery, Ajax, Data Formats: HTML, XML, JSON, JSONP

Introduction

jQuery and Ajax

Using Ajax on Your Whole Site

Using Simple Ajax with User Feedback

Using Ajax Shortcuts and Data Types

Using HTML Fragments and jQuery

Converting XML to DOM

Creating JSON

Parsing JSON

Using jQuery and JSONP


Chapter 17
 Using jQuery in Large Projects

Introduction

Using Client-Side Storage

Saving Application State for a Single Session

Saving Application State Between Sessions

Using a JavaScript Template Engine

Queuing Ajax Requests

Dealing with Ajax and the Back Button

Putting JavaScript at the End of a Page


Chapter 18
 Unit Testing

Introduction

Automating Unit Testing

Asserting Results

Testing Synchronous Callbacks

Testing Asynchronous Callbacks

Testing User Actions

Keeping Tests Atomic

Grouping Tests

Selecting Tests to Run


Search Flipkart Products:
Flipkart.com

No comments: