jQuery Selectors Reference

All jQuery selectors.

jQuery Selectors Reference

SelectorExampleDescription
*$("*")All elements
#id$("#lastname")Element with id="lastname"
.class$(".intro")Elements with class="intro"
element$("p")All <p> elements
:first$("p:first")The first <p> element
:last$("p:last")The last <p> element
:even$("tr:even")All even <tr> elements
:odd$("tr:odd")All odd <tr> elements

Example

$("p:first").hide();