gplcb-checkbox-as-radio-button.js

Code

Filename: gplcb-checkbox-as-radio-button.js

$( '.gplcb-checkbox-as-radio' ).find( 'input[type="checkbox"]' ).change( function() {
	$( this ).parents( '.gfield' ).find( 'input[type="checkbox"]' ).prop( 'checked', false );
	$( this ).prop( 'checked', true );
} );

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.