Chapter 2. Selecting elements

This chapter covers

  • Selecting elements with jQuery by using CSS selectors
  • Discovering the unique jQuery-only filters
  • Developing custom filters
  • Learning the context parameter of the jQuery() function

In this chapter, we’ll examine in great detail how the DOM elements to be acted upon are identified by looking at one of the most powerful and frequently used capabilities of jQuery’s $() function: the selection of DOM elements via selectors. Throughout the pages of this chapter, you’ll become familiar with the plethora of selectors available. jQuery not only provides full support for all the CSS selectors but also introduces other ones. We’ll also introduce you to filters, many of which are special jQuery-only ...

Get jQuery in Action, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.