CHAPTER 3

image

jQuery Selectors

This chapter covers jQuery selectors, which are used to get (or select) HTML elements based on their ID, tag name, class name, types, attributes, attributes values, and other criteria. The set of selected elements can be fine-tuned further by using selector extensions or jQuery methods and the set can be expanded by using certain jQuery methods. Once you have a desired set of elements, you can access and manipulate their attributes values, properties, and style.

In this chapter and next two chapters, you will work on recipes that show you how you can use jQuery to select HTML elements directly or indirectly (by traversing ...

Get jQuery 2 Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.