jQuery Cookbook

David is making websites for financial institutions and bringing the benefits of jQuery for ASP.NET enterprise applications. ….

More PDF Content

jQuery Cookbook

  • Foreword… xi
  • Contributors… xiii
  • Preface… xvii
  • 1. jQuery Basics… 1
  • 1.1 Including the jQuery Library Code in an HTML Page
  • 1.2 Executing jQuery/JavaScript Coded After the DOM Has Loaded but Before Complete Page Load
  • 1.3 Selecting DOM Elements Using Selectors and the jQuery Function
  • 1.4 Selecting DOM Elements Within a Specified Context
  • 1.5 Filtering a Wrapper Set of DOM Elements
  • 1.6 Finding Descendant Elements Within the Currently Selected Wrapper Set
  • 1.7 Returning to the Prior Selection Before a Destructive Change
  • 1.8 Including the Previous Selection with the Current Selection
  • 1.9 Traversing the DOM Based on Your Current Context to Acquire a New Set of DOM Elements
  • 1.10 Creating, Operating on, and Inserting DOM Elements
  • 1.11 Removing DOM Elements
  • 1.12 Replacing DOM Elements
  • 1.13 Cloning DOM Elements
  • 1.14 Getting, Setting, and Removing DOM Element Attributes
  • 1.15 Getting and Setting HTML Content
  • 1.16 Getting and Setting Text Content
  • 1.17 Using the $ Alias Without Creating Global Conflicts
  • 2. Selecting Elements with jQuery… 35
  • 2.1 Selecting Child Elements Only
  • 2.2 Selecting Specific Siblings
  • 3. Beyond the Basics… 53
  • 4. jQuery Utilities… 77
  • 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
  • 4.9 Attaching Objects and Data to DOM with jQuery.data
  • 4.10 Extending Objects with jQuery.extend
  • 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
  • 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
  • 5. Faster, Simpler, More Fun… 87
  • 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
  • 6. Dimensions… 135
  • 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
  • 7. Effects… 151
  • 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
  • 8. Events… 171
  • Attaching a Handler to Many Events
  • Reusing a Handler Function with Different Data
  • Removing a Whole Set of Event Handlers
  • Triggering Specific Event Handlers
  • 9. Advanced Events… 191
  • 10. HTML Form Enhancements from Scratch… 211
  • 11. HTML Form Enhancements with Plugins… 2370
  • 12. jQuery Plugins… 263
  • 12.1 Where Do You Find jQuery Plugins?
  • viii | Table of Contents
  • 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
  • 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
  • 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
  • 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
  • 13. Interface Components from Scratch… 279
  • 14. User Interfaces with jQuery UI… 315
  • 15. jQuery UI Theming… 341
  • 16. jQuery, Ajax, Data Formats: HTML, XML, JSON, JSONP… 391
  • 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
  • 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
  • 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
  • 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
  • jQuery and Ajax
  • Using Ajax on Your Whole Site
  • Using Simple Ajax with User Feedback
  • Using Ajax Shortcuts and Data Types
  • 17. Using jQuery in Large Projects… 411
  • 18. Unit Testing… 425
  • Index… 437
  • Using HTML Fragments and jQuery
  • Converting XML to DOM
  • Creating JSON
  • Parsing JSON
  • Using jQuery and JSONP
  • 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
  • Automating Unit Testing
  • Asserting Results
  • Testing Synchronous Callbacks
  • Testing Asynchronous Callbacks
  • Testing User Actions
  • Keeping Tests Atomic
  • Grouping Tests
  • Selecting Tests to Run
Download jQuery Cookbook pdf from listic.ru, 478 pages, 5812.46KB.
Related Books

4 Responses to “jQuery Cookbook”

  1. Looking to get those perfect abs everyone loves? Free video at http://top-abs.top-information.net/

  2. http://youtube.com/watch?v=fcboahbXtUo on February 12th, 2014 at 9:19 am

    At this time I am going away to do my breakfast, afterward having
    my breakfast coming over again to read more news.

  3. products protein on February 14th, 2014 at 7:03 am

    They are easily digestible, containing nutrient-dense super foods that are perfect for
    those who want to be ultra-healthy and fit. Due to the fact your body’s muscles need carbohydrates throughout recovery,
    (not just protein) a pure protein shake won’t supply you with
    an optimal recovery. Liquid egg whites have high amounts of pure,
    100% bio-available protein, up to 26 grams in every 8-ounce glass.

  4. Heya! I just wanted to ask if you ever have any
    trouble with hackers? My last blog (wordpress) was hacked and
    I ended up losing a few months of hard work due to no data backup.
    Do you have any solutions to protect against hackers?

Leave a Reply