Extending jQuery
Keith B. Wood
Foreword by Dave Methvin
  • August 2013
  • ISBN 9781617291036
  • 312 pages
  • printed in black & white

Delves into just about every facet of extending jQuery’s functionality.

Dave Methvin, President jQuery Foundation

Extending jQuery teaches you to build custom extensions to the jQuery library. It covers all the extension points within jQuery and provides guidelines and techniques on how to make use of them. You'll not only discover how to write plugins, but how to design them for maximum reuse. You'll also learn how to write new widgets and effects for jQuery UI. Along the way, you'll explore extensions in key areas including Ajax, events, animation, and validation.

Table of Contents show full

foreword

preface

acknowledgments

about this book

about the cover illustration

Part 1 Simple extensions

1. jQuery extensions

1.1. jQuery background

1.2. Extending jQuery

1.3. Extension examples

1.4. Summary

2. A first plugin

2.1. jQuery architecture

2.2. A simple plugin

2.3. Summary

3. Selectors and filters

3.1. What are selectors and filters?

3.2. Adding a pseudo-class selector

3.3. Adding a set filter

3.4. Summary

Part 2 Plugins and functions

4. Plugin principles

4.1. Plugin design

4.2. Guiding principles

4.3. Summary

5. Collection plugins

5.1. What are collection plugins?

5.2. A plugin framework

5.3. Defining your plugin

5.4. Attaching to an element

5.5. Setting options

5.6. Adding event handlers

5.7. Adding methods

5.8. Removing the plugin

5.9. Finishing touches

5.10. The complete plugin

5.11. Summary

6. Function plugins

6.1. Defining your plugin

6.3. Summary

7. Test, package, and document your plugin

7.1. Testing your plugin

7.2. Packaging your plugin

7.3. Documenting your plugin

7.4. Summary

Part 3 Extending jQuery UI

8. jQuery UI widgets

8.1. The widget framework

8.2. Defining your widget

8.3. Attaching the plugin to an element

8.4. Handling plugin options

8.5. Adding event handlers

8.6. Adding methods

8.7. Removing the widget

8.8. Finishing touches

8.9. The complete plugin

8.10. Summary

9. jQuery UI mouse interactions

9.1. The jQuery UI Mouse module

9.2. Defining your widget

9.3. Attaching the plugin to an element

9.4. Handling plugin options

9.5. Adding event handlers

9.6. Interacting with the mouse

9.7. Adding methods

9.8. Removing the widget

9.9. The complete plugin

9.10. Summary

10. jQuery UI effects

10.1. The jQuery UI effects framework

10.2. Adding a new effect

10.3. Animation easings

10.4. Summary

Part 4 Other extensions

11. Animating properties

11.1. The animation framework

11.2. Adding a custom property animation

11.3. Summary

12. Extending Ajax

12.1. The Ajax framework

12.2. Adding an Ajax prefilter

12.3. Adding an Ajax transport

12.4. Adding an Ajax converter

12.5. Ajax plugins

12.6. Summary

13. Extending events

13.1. The special event framework

13.2. Adding a special event

13.3. Enhancing an existing event

13.4. Other event functionality

13.5. Summary

14. Creating validation rules

14.1. The Validation plugin

14.2. Adding a validation rule

14.3. Adding a multiple-field validation rule

14.4. Summary

© 2014 Manning Publications Co.

About the Technology

jQuery, the most popular JavaScript library, helps make client-side scripting of HTML easy. It offers many built-in abilities to traverse and alter the DOM, but it can't do everything. Fortunately, you can tap into jQuery's numerous extension points to create your own selectors and filters, plugins, animations, and more. This book shows you how.

About the book

Extending jQuery teaches you to build custom extensions to the jQuery library. In it, you'll discover how to write plugins and how to design them for maximum reuse. You'll also learn to write new widgets and effects for the jQuery UI. Along the way, you'll explore extensions in key areas including Ajax, events, animation, and validation.

What's inside

  • Create jQuery UI widgets and effects
  • Make extensions available for distribution and reuse
  • Build your own libraries

About the reader

This book assumes intermediate-level knowledge of jQuery and JavaScript. No experience writing plugins or other extensions is required.

About the author

Keith Wood has developed over 20 jQuery plugins including the original Datepicker, World Calendar, Countdown, and SVG.


combo $44.99 pBook + eBook
eBook $35.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

A must-read for all serious web developers.

Ecil Teodoro, IBM

Finally, a complete resource on the extension of jQuery and its framework.

Daniele Midi, Whitelemon Design Studio

A well-written and technically excellent guide.

Brady Kelly, Erisia Web Development