Bug Tracker

Opened 9 years ago

Closed 9 years ago

#8385 closed bug (worksforme)

:button selector disregards submit button

Reported by: mikepodonyi@… Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

Description

Expected behaviour:

The following Selector should set the value of all input elements to empty (except all buttons)

$(':input:not(:button)').val("");

actual behaviour:

The value of submit buttons get erased.

Here a link to jsfiddle: http://jsfiddle.net/Mbzc6/1/

Change History (1)

comment:1 Changed 9 years ago by dmethvin

Resolution: worksforme
Status: newclosed

Seems to be working as documented. Submit buttons are not <input type=button> or <button> elements, try :submit instead:

http://api.jquery.com/button-selector/

Note: See TracTickets for help on using tickets.