Check / Uncheck checkbox and radio button with jquery

Author: | Categories: Programming No Comments

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

Leave a Reply

Your email address will not be published.