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
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
The attribute name passed to
.attr()
needs to be in quotes, like this:Also make sure this is running in a
document.ready
event handler, or somewhere else after the element is ready, e.g.: