:first
This will find the first selected
element. The following code finds the first row in a table of 5 rows.
$("tr:first")
:last
Matches the last selected element.
:not(selector)
Filters
out all elements matching the given selector. This will select all the
elements which doesn't match the given selector. Consider the following example
:
$("input:not(:checked))
This
code will match all the check boxes which are not checked.
:even
Finds
all the even elements. The following example find all the even rows i.e.
0Th, 2nd, 4th, 6th and so on.
$("tr:even")
:odd
Matches
all the odd elements
$("tr:odd")
:eq(index)
Finds
a single element by its index. The following example finds the 3rd
TD in a set of Tds.
$("td:eq(3)")
:gt(index)
Finds
all the elements which have index more than the given index. The following
example finds all the Tds with index greater than 2.
$("td:gt(2)")
In a
set of 6 TDs only 3rd, 4th, 5th, 6th
TDs will be selected.
:lt(index)
Finds
all the elements which have index less than the given index.
:header
Matches
all Header elements like h1, h2, h3 and so on.
$(":header")
:animated
Matches
all elements that are currently being animated.
$("div:animated")
Suppose
there are 3 DIVs out of which one is being animated. Then the above code will
select the currently animated DIV.