O'Reilly logo

Learning PHP, MySQL & JavaScript, 5th Edition by Robin Nixon

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

Appendix E. jQuery Selectors, Objects, and Methods

Chapter 21 gives you a good grounding in using the jQuery JavaScript library. To help you use jQuery to the fullest, here’s a comprehensive list of the selectors, objects, and methods it uses. There wasn’t room to introduce all of them in this book, but you should now know enough to be able to use them correctly.

Please bear in mind, though, that sometimes new features are added, bugs are fixed, and other features are deprecated or removed. You can keep up to date with the latest developments, information on deprecated or removed features (not detailed here), and newer releases of jQuery on the jQuery website and in the API documentation.

jQuery Selectors

('*')

Selects all elements.

('element')

Selects all elements with the given tag name.

('#id')

Selects a single element with the given ID.

('.class')

Selects all elements with the given class.

('selector1, selector2, ...selectorN')

Selects the combined results of all the specified selectors.

('ancestor descendant')

Selects all elements that are descendants of the given ancestor.

('prev + next')

Selects all elements matching next that are immediately preceded by a sibling prev.

('prev ~ siblings')

Selects all sibling elements that follow the prev element, have the same parent, and match the filtering siblings selector.

('parent > child')

Selects all direct child elements specified by child of elements specified by parent.

[name]

Selects elements that have the specified attribute ...

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