Ticket #8231 (closed bug: duplicate)
.attr can't change a submit input
|Reported by:||remysharp||Owned by:|
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).