How can you make input[disabled=true] work in jQuery?
How can you make input[disabled=true] work in jQuery? http://jsfiddle.net/Bps9U/
Share
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 boolean attribute, and as such has only two states: Set and not set.The following are all equal:
You can match all variants with
$("input[disabled]").With jQuery, you can get the state of an element with
$(...).prop('disabled'), which will return a boolean.