18

i have many checkbox:

    <input type="checkbox" name="checkbox_user" value = "1"/>
    <input type="checkbox" name="checkbox_user" value = "2"/>   
    <input type="checkbox" name="checkbox_user" value = "3"/>
...

and checkbox with value 2 is selected. Is possible unselect checkbox (with jQuery) when i now only value.

1 Answer 1

48
$("input:checkbox[value=2]").attr("checked", true);
Sign up to request clarification or add additional context in comments.

2 Comments

Why do I never see you on SO? :)
I answer things 5 minutes before you, like a ninja.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.