jQuery bug in Chrome with form submission disabling
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 do开发者_如何学JAVAesn't work in Chrome.
It works fine for me: http://jsfiddle.net/YEZS7/
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;
});
精彩评论