I always try to do this $("input[name=button]").attr("disabled", ''); and it doesn’t work. Why does this not work?
I ended up using this $("input[name=button]").attr("disabled", false);. Seems to me that both are equivalent.
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.
disabledis a so called boolean attribute:So an empty value still indicates the presence of the attribute and therefore the form element stays disabled.
They are not. jQuery treats boolean attributes differently. It tests the value of the new, uhm, value, and removes the attribute if the value is
false: