Reputation: 5568
Here is my code:
$('#continue').click(function() {
$('input[type=submit]', this).attr('disabled', 'disabled');
});
This disables the submit button and it works in Firefox and IE. But it doesn't work in Chrome or most likely Safari.
EDIT: I want the button reenabled when a particular link is clicked. I have this:
$("#continue").removeAttr("disabled");
but it doesn't work in Chrome.
Upvotes: 1
Views: 1070
Reputation: 823
Do you want to disable the submit button if the user clicks on another element, or is #continue the submit button? Because in this case, you just need to return false in your click-function.
$('#continue').click(function() {
return false;
});
Upvotes: 0