jQuery
HTML
CSS
JavaScript
PHP
SQL
WordPress
jQuery Reference

Quick Reference

This is a quick reference list of jQuery selectors and how they work in selecting HTML elements to apply scripting.

jQuery – * Selector

The * selector selects all HTML elements in the document, and if used together with another element can be used to select all that element’s child elements.

jQuery – .class Selector

The .class selector selects all HTML elements with a specific class, which may include multiple elements on the page.

jQuery – :contains() Selector

The :contains() selector selects elements containing a specified string directly within it or indirectly in a child, grandchild, etc. of the element.

jQuery – :even Selector

The :even selector selects every element with an even index number (0, 2, 4, etc.). This is often used to create a striped row look in HTML tables.

jQuery – :has() Selector

The :has() selector selects all elements that have one or more elements inside of them that matches the specified selector.

jQuery – :hidden Selector

The :hidden selector selects hidden elements (display: none, form elements with type=hidden, elements with zero width/height, child with a hidden parent).

jQuery – #id Selector

The #id selector selects an HTML element with a specific id. HTML only allows for one unique #id per document.

jQuery – :lang() Selector

The :lang() selector selects all elements with the language attribute starting with a specified value (e.g., lang=”en” or lang=”en-us”).

jQuery – :nth-child() Selector

The :nth-child() selector selects all specified elements that are the nth child of their parent, regardless of all the children’s types.

jQuery – :nth-last-child() Selector

The :nth-last-child() selector selects all elements that are the nth child of their parent, regardless of all the children’s types, counting from the end.

jQuery – :odd Selector

The :odd selector selects every element with an odd index number (1, 3, 5, etc.). This is often used to create a striped row look in HTML tables.

jQuery – :only-child Selector

The :only-child selector selects every element that is the only child of its parent. If the parent has multiple child elements, it will NOT be selected.

jQuery – :visible Selector

The :visible selector selects elements NOT set to: display: none, form elements with type=hidden, elements with zero width/height, child with a hidden parent.

We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.

jQuery
HTML
CSS
JavaScript
PHP
SQL
WordPress

Why 1SMARTchicken?

This site was built and is maintained to benefit my autistic son.
See More →

My Son's Name is Johnny

He was diagnosed as autistic quite late, at age four...
His story

Buy Me a Coffee

Thanks for your support!

Feedback

If you see an error on the page or the code itself is incorrect or incomplete, or just plain wrong, please let us know. We’re always learning. NOTE: we do not sell your information and will not send you spam emails.