|
Articles > jQuery > How to check/uncheck a checkbox input or radio button in jQuery |
|
How to check/uncheck a checkbox input or radio button in jQuery
Author: Venkata Sudhakar
The below example shows how to check/uncheck a checkbox input or radio button in jQuery.
02 | $( "#item" ).prop( "checked" , true ); |
05 | $( "#item" ).prop( "checked" , false ); |
08 | function selectAllUsers() { |
09 | $( ".user" ).each( function () { |
10 | $( this ).prop( "checked" , true ); |
14 | function unselectAllUsers() { |
15 | $( ".user" ).each( function () { |
16 | $( this ).prop( "checked" , false ); |
|
|