Friday, December 8, 2017

How do I check/uncheck a checkbox input or radio button using jQuery

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

No comments:

Post a Comment