Question #37
How to check a radio button in jQuery?
Merged questions
Answer
In jQuery, you can check or uncheck a checkbox element or a radio button using the .prop()
method as on the following example:
// Check
$( "#id" ).prop( "checked", true );
// Uncheck
$( "#id" ).prop( "checked", false );
6 events in history
Question by Alphonsio 05/18/2020 at 02:37:18 PM
How to check / uncheck a radio button in jQuery?
Question by Alphonsio 05/18/2020 at 02:37:09 PM
How to check a radio button in jQuery?
Question by Alphonsio 05/18/2020 at 02:37:02 PM
How to uncheck a radio button in jQuery?
Question by Alphonsio 05/18/2020 at 02:36:31 PM
How to check / uncheck a checkbox input in jQuery?
Question by Alphonsio 05/18/2020 at 02:36:18 PM
How to check a checkbox input in jQuery?
Answer by Alphonsio 05/18/2020 at 02:36:03 PM
In jQuery, you can check or uncheck a checkbox element or a radio button using the .prop()
method as on the following example:
// Check
$( "#id" ).prop( "checked", true );
// Uncheck
$( "#id" ).prop( "checked", false );
# | ID | Query | URL | Count |
---|
Icons proudly provided by Friconix.