Jquery validation check any one checkbox

Code examples

1
0

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 );
                }
            })

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................