iCheck check if checkbox is checked
For those who struggle with this:
const value = $('SELECTOR').iCheck('update')[0].checked;
This directly returns true
or false
as boolean
.
you can get value of checkbox and status by
$('.i-checks').on('ifChanged', function(event) { alert('checked = ' + event.target.checked); alert('value = ' + event.target.value);});
Check this :
var checked = $(".myCheckbox").parent('[class*="icheckbox"]').hasClass("checked");if(checked) { //do stuff}