Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression.
If no element fits, or the expression is not valid, then the response will be 'false'.
Note: As of jQuery 1.3 all expressions are supported. Previously complex expressions, such as those containing hierarchy selectors (such as +, ~, and >), always returned 'true'.
filter is used internally, therefore all rules that apply there apply here, as well.
Arguments:
| expr | String | |
|---|---|---|
| The expression with which to filter | ||