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.
Question
How can I check an iCheck checkbox using JavaScript? Already tried the code:
document.getElementById("checkbox").checked = true;
No correct solution
OTHER TIPS
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')
.