Is there a way in JQuery to check checkboxes based on their value.
e.g. if I have 3 checkboxes with the value ‘test’ is there any way I can check them all based just on the fact that they have the value ‘test’
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.
See:
Demo: http://jsfiddle.net/GNJ6t/
EDIT:
jQuery 1.6 introduces the
.prop()method, which is the supposed best way of achieving the above. From the manual:So: