Given a submit button:
<input type="submit" value="Sign Up" name="AddToCart" size="2" id="AddToCart" />
why wouldn’t this code disable the button:
$('#AddToCart').attr(disabled, 'disabled');
mny thx
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The attribute name passed to
.attr()needs to be in quotes, like this:Also make sure this is running in a
document.readyevent handler, or somewhere else after the element is ready, e.g.: