If I understand you, you should do something like:
$('input:checkbox').eq(i).removeAttr('checked');
To install it, you should use:
$('input:checkbox').eq(i).attr('checked','checked');
Note that the initial selector will receive all the checkboxes on the page. If you need to limit it to only a subset of the checkboxes on the page, adjust the initial selector - based on the container or naming scheme for the checkboxes - to consider only the corresponding checkboxes. I also assume that you are using indexing with a zero index for the corresponding checkbox.
source share