:reset JQ Home  <<  Selectors  <<  :reset

Form reset selector.

Shorthand version $(':reset')


The :reset selector, selects all elements of type reset.

Being a jQuery extension the :reset pseudo selector is not part of any current CSS specification. Therefore :reset cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method.

The same results can be achieved with valid CSS using $('[type=reset]'), without the hit to performance.

If this selector is not preceded by another selector, the universal selector ("*") is implied and so the whole DOM will be searched. Use another selector as in the example below to narrow the search and improve performance.


Signature Description
jQuery(':reset')Form reset pseudo-class match





:reset Example Selectors  <<  Top

Selects all elements of type reset.

In the example below we apply an orange background to 'reset' elements within the form when the button is clicked.

  $('.ourform').submit(function () { return false; }); // disable submit 
  $('#btn8').on('click', function() {
    $('form input:reset').css('backgroundColor', 'orange');

Pie Survey     




Which pie do you prefer?:

Select a pie shape: 


Press the button below to action the above code:

Related Tutorials

jQuery Basic Tutorials - Lesson 4 - jQuery Selectors