:checked //Matches all elements that are checked or selected. :selected $("option:selected[value=1]") :focus //Selects element if it is currently focused. :disabled :enabled //Selects all elements that are enabled.
:header // select all header elements, such as <H1>,<H2> :animated
Filter Methods
Filter Methods
filter("p") // get all <p> elements in jquery dom set $("li").has("span") //get all li has child element 'span' not("p, .name") // get all not <p> and class=name elements in jquery dom set
Position Method
first() last() eq("") // index begin with 0
Hierarchical Methods
Select parent or ancestors
parent() // one parent parents() // all ancestors $("span").parents("ul"); // all ancestors $("span").parentsUntil("div") // returns all ancestor elements between two given arguments
Select children or descendants
children("") children() find(""); // find descendants // the find() is similar to the children() method,but childern() only find children not descendants.
Select siblings
siblings() siblings("") // get other dom of same level, don't contain self next() nextAll() nextUntil() prev() prevAll() prevUntil()