Skip to content

Commit

Permalink
add :reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Montgomery committed Feb 8, 2012
1 parent 1083aee commit 3882fb5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion content/jquery-basics/selecting-elements.md
Expand Up @@ -306,7 +306,19 @@ the pseudo-selector with a tag name/some other selector.


#### :reset
Selects inputs with type="reset"

<javascript caption=":reset pseudo-selector">
$('form :reset'); // selects all elements of type "reset"
</javascript>

Much like some other pseudo-selectors, in order to get the best performance using `:reset`, we recommend to
first select elements with a standard jQuery selector, then to use
`.filter(":reset")`, or to precede
the pseudo-selector with a tag name/some other selector.

**Note:** for better performance in modern browsers, we recommend using
`[type="reset"]` instead of the `:reset` pseudo-selector.


#### :selected
Selects options that are selected
Expand Down

0 comments on commit 3882fb5

Please sign in to comment.