Answers for "how to check a check box using jquery"

9

check a checkbox jquery

$('#grepperRocks').prop('checked', true);
Posted by: Guest on March-17-2020
1

how to check the checkbox in jquery

check all checkbox whit button

// Check #x
$( "#x" ).prop( "checked", true );
 
// Uncheck #x
$( "#x" ).prop( "checked", false );


example

      $('.checkAll').click(function () {
                if($(':checkbox').is(':checked')){
                    $(':checkbox').prop( "checked", false );
                }else{
                    $(':checkbox').prop( "checked", true );
                }
            })
Posted by: Guest on March-27-2021

Code answers related to "how to check a check box using jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language