Closed it-can closed 10 years ago
Calling $('.my-checkbox').prop('checked')
returns the correct value for me, but it only works for checkboxes and also depends on your jquery version.
jQuery 1.6+
$('#isAgeSelected').prop('checked')
jQuery 1.5 and below
$('#isAgeSelected').attr('checked')
All credit to: http://stackoverflow.com/a/426276/443427
Does that help?
thanks!
Hi,
Is there a way to get the current state of an iCheck checkbox/radio?
I have a submit button but that checks a couple of checkboxes before posting the form... It seems that $('.terms').prop('checked') is not working...