What this book covers
Chapter 2, Selecting Elements, will teach how to use jQuery’s selector expressions and DOM traversal methods to find elements on the page, wherever they may be. You’ll use jQuery to apply styling to a diverse set of page elements, sometimes in a way
that pure CSS cannot.
Chapter 3, Handling Events, will walk you through jQuery’s event-handling mechanism to fire off behaviors when browser events occur. You’ll see how jQuery makes it easy to attach events to elements unobtrusively, even before the page finishes loading. Also, you’ll get an overview of deeper topics, such as event
bubbling, delegation, and namespacing.
Chapter 4, Styling and Animating, will introduce you to jQuery’s animation techniques and how to hide, show, and move page elements with effects that are both useful and pleasing to the eye.
Chapter 5, Manipulating the DOM, will teach you how to change your page on command. This chapter will also teach you how to alter the very structure of an HTML document, as well as adding to its content on the fly.
Chapter 6, Sending Data with Ajax, will walk you through many ways in which jQuery makes it easy to access server-side functionality without resorting to clunky page refreshes. With the basic components of the library well in hand, you will be ready to explore how the library can expand to fit your needs.
Chapter 7, Using Plugins, will show you how to find, install, and use plugins, including the powerful jQuery UI and jQuery Mobile plugin libraries.
Chapter 8, Developing Plugins, will teach you how to take advantage of jQuery’s impressive extension capabilities to develop your own plugins from the ground up. You’ll create your own utility functions, add jQuery object methods, and discover the jQuery UI widget factory. Next, you’ll take a second tour through jQuery’s building blocks, learning more advanced techniques.
Chapter 9, Advanced Selectors and Traversing, will refine your knowledge of selectors and traversals, gaining the ability to optimize selectors for performance, manipulate the DOM element stack, and write plugins that expand selecting and traversing capabilities.
Chapter 10, Advanced Events, will dive further into techniques such as delegation and throttling that can greatly improve event-handling performance. You’ll also create custom and special events that add even more capabilities to the jQuery library.
Chapter 11, Advanced Effects, will fine-tune the visual effects of jQuery that can be provided by crafting custom-easing functions and reacting to each step of an animation. You’ll gain the ability to manipulate animations as they occur and schedule actions with custom queuing.
Chapter 12, Advanced DOM Manipulation, will provide you with more practice modifying the DOM with techniques such as attaching arbitrary data to elements. You’ll also learn how to extend the way jQuery processes CSS properties on elements.
Chapter 13, Advanced Ajax, will help you achieve a greater understanding of Ajax transactions, including the jQuery deferred object system for handling data that may become available at a later time.
Appendix C, Quick Reference, will provide a glimpse of the entire jQuery library, including every one of its methods and selector expressions. Its easy-to-scan format is perfect for those moments when you know what you want to do, but you’re just unsure about the right method name or selector.
What you need for this book
In order to run the example code demonstrated in this book, you need a modern web browser such as Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Internet Explorer.
To experiment with the examples and to work on the chapter-ending exercises, you will also need:
- A basic text editor
- Web development tools for the browser such as the Chrome Developer Tools or Firebug (as described in the Using development tools section of Chapter 1, Getting Started )
- The full code package for each chapter, which includes a copy of the jQuery library (seen in the following Downloading the example code section)
Additionally, to run some of the Ajax examples in Chapter 6, Sending Data with Ajax and beyond, you will need a PHP-enabled web server.
Who this book is for
By reading this book, you will become familiar with the functionality and syntax of jQuery 1.10.x and jQuery 2.0.x, the latest versions at the time of writing.