icheck icon indicating copy to clipboard operation
icheck copied to clipboard

Option to disable check and uncheck events from triggering

Open coalvilledave opened this issue 9 years ago • 2 comments

Thanks for this plugin - it's excellent!

I'm using nested iCheck inputs to provide a heirarchical drop down checklist. Therefore if the user checks the parent checkbox, all others below it also get checked and the child list gets expanded so the user can see it.

However, when I programmtically check the child checkboxes using .iCheck('check') it then fires the changed event for those checkboxes, which recursively calls my event handler. I don't want this to happen.

I think you should provide an option to disable events triggered by programmatically changing the state of the checkbox.

coalvilledave avatar Oct 08 '15 09:10 coalvilledave

Had a similar issue, but can be overcome by setting the input's checked property followed by calling iCheck('update). For example:

$('input').prop('checked',true).iCheck('update');

zighead avatar Apr 12 '16 19:04 zighead

Thanks zighead - I'll give it a go!

coalvilledave avatar Apr 13 '16 06:04 coalvilledave