By default, if no context is specified, $() looks for DOM elements within the context of the current HTML document. If you do specify a context, such as a DOM element or jQuery object, the expression will be matched against the contents of that context.
See Selectors for the allowed CSS syntax for expressions.| expression | String | |
|---|---|---|
| An expression to search with. | ||
| context (Optional) | Element, jQuery | |
| A DOM Element, Document or jQuery to use as context | ||