Check / Uncheck checkbox and radio button with jquery
You can check or uncheck a checkbox element or a radio button using the .prop() method
// Check #x
$( "#x" ).prop( "checked", true );
// Uncheck #x
$( "#x" ).prop( "checked", false );
You can check or uncheck a checkbox element or a radio button using the .prop() method
// Check #x
$( "#x" ).prop( "checked", true );
// Uncheck #x
$( "#x" ).prop( "checked", false );