From the Documentation:
$('input').iCheck('check');
It'd be good to read the documentation of any plugins you find online, as they usually contain many answers to your questions, thus avoiding the need to ask in forums.
Pergunta
How can I check an iCheck checkbox using JavaScript? Already tried the code:
document.getElementById("checkbox").checked = true;
Nenhuma solução correta
Outras dicas
From the Documentation:
$('input').iCheck('check');
It'd be good to read the documentation of any plugins you find online, as they usually contain many answers to your questions, thus avoiding the need to ask in forums.
Use $(element).iCheck('check');
where element
is replaced with the desired element, e.g. document.getElementById('elementIdHere')
.