0 votes
1 view
in Web Technology by (47.8k points)

I'd like to do something like this to tick a checkbox using jQuery:




Does such a thing exist?

1 Answer

0 votes
by (107k points)

For setting “checked” for a checkbox with jQuery if you're working with just one element, you can always just modify the HTMLInputElement's .checked property below is the code for the same:-

$('.myCheckbox')[0].checked = true; 

$('.myCheckbox')[0].checked = false;

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !