Modify ↓
Ticket #8231 (closed bug: duplicate)
.attr can't change a submit input
| Reported by: | remysharp | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | attributes | Version: | 1.5 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Changing a submit input element to a button (or perhaps another type) causes jQuery to throw a fatal exception:
$('input[type=submit]').attr('type', 'button'); throws fatal
Working example: http://jsbin.com/arida/2
Note that it throws an exception (which is why I've wrapped them in a try/catch for the example).
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
