HTML and CSS Reference
In-Depth Information
> documentContext = $('#tblTasks');
> $('tr:first()', documentContext);
It is possible to specify more than two levels of selection within a single selection criterion.
For instance, we may want to find all the td elements in the last row of all the tables in the
second section of the document. This can be performed as follows:
> $('section:eq(1) table tr:last td')
Sometimes we may want to be more precise about the relationship between elements. For
instance, we may want to select elements that are direct children (rather than just de-
cedents) of another element. This can be accomplished through the use of the “>” sign, for
> $('select[name="category"] > option')
This will find all the option elements within a particular select element, but only because
they are direct children of the select box. For instance, this will not return any results:
> $('form > option')
Search WWH ::

Custom Search