O'Reilly logo

jQuery in Action, Second Edition by Yehuda Katz, Bear Bibeault

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Selecting the elements upon which to act

This chapter covers

  • Selecting elements to be wrapped by jQuery using selectors
  • Creating and placing new HTML elements in the DOM
  • Manipulating the wrapped element set

In the previous chapter, we discussed the many ways that the jQuery function can be used. Its capabilities range from the selection of DOM elements to defining functions to be executed when the DOM is loaded.

In this chapter, we’ll examine (in great detail) how the DOM elements to be acted upon are identified by looking at two of the most powerful and frequently used capabilities of jQuery’s $() function: the selection of DOM elements via selectors and the creation of new DOM elements.

A good number of the capabilities required ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required