Use prop(‘checked’, true / false) instead of removeAttr
$('input[name=foo]').prop('checked', true);
$('input[name=foo]').prop('checked', false);
More Related Contents:
- Setting “checked” for a checkbox with jQuery
- Using jquery check/uncheck SelectAll checkbox when all the checkboxes in the group are checked/unchecked
- How do I check whether a checkbox is checked in jQuery?
- Check if checkbox is checked with jQuery
- jQuery checkbox change and click event
- How to stop event bubbling on checkbox click
- jQuery difference between change and click event of checkbox
- Testing if a checkbox is checked with jQuery
- How to check all checkboxes using jQuery?
- What the difference between .click and .change on a checkbox [duplicate]
- How to select all checkboxes with jQuery?
- How do I encode a JavaScript object as JSON?
- How do i disable a submit button when checkbox is uncheck?
- Possible to associate label with checkbox without using “for=id”?
- How to check in js that user has checked the checkbox in Google recaptcha?
- How to reset all checkboxes using jQuery or pure JS?
- Why isn’t my checkbox change event triggered?
- jQuery ajax success callback function definition
- Check if event exists on element [duplicate]
- How to Compare two Arrays are Equal using Javascript? [duplicate]
- What are techniques to get around the IE file download security rules?
- javascript: detect scroll end
- Get the DOM path of the clicked
- How to validate a form with multiple checkboxes to have atleast one checked
- Sorting of jqGrid (v4.1.2) treegrid not working with Ajacency Model
- Chain ajax and execute it in sequence. Jquery Deferred
- How do I make an area unclickable with CSS?
- minimise the code since I am using the same code only the content in p tags changes and component AccordionHeader header changes
- let user scrolling stop jquery animation of scrolltop?
- jQuery: Count words in real time