JQuery Selection

uses css selection pattern so: #id for by id and .class for by class

paths are separated by spaces. e.g. $(‘.tableClass tr’) and can be further filtered with the following predicates:

Selector Result
: first if the pattern has multiple matches, returns the first match
: last if the pattern has multiple matches, returns the last match
: even if the pattern has multiple matches, returns every even ordinal match
: odd if the pattern has multiple matches, returns every odd ordinal match
> the next selector in the path has to be an immediate child of the preceding one
[attribute=value] select elements with the required attribute match a[href=#]

The selection can be a string containing html that is to be added to the DOM for the page

Leave a Reply