drgullin / icheck

Highly customizable checkboxes and radio buttons (jQuery & Zepto)
http://fronteed.com/iCheck
7.38k stars 1.62k forks source link

check all / uncheck all problem #182

Closed Mathias89 closed 9 years ago

Mathias89 commented 10 years ago

I have 100 checkboxes and one for un/check them all. ''' $(document).on('ifToggled', '.check-all', function() { if (this.checked) { $('.to-change').icheck('checked'); } else { $('.to-change').icheck('unchecked'); } }); ''' The problem is that I don't want that the event ifToggled is fired for the to change inputs. How can this prevented? I just want to update the view and not the behaviour that the 100 checkboxes were checked.

Here is an image: image

How it should work: first checkbox un/checks all others. Each checkbox enumerates the info where a checkbox is checked.

But if i use the above code the function for the enumeration is called by each checkbox and I have to wait a while... Thanks in advance

drgullin commented 9 years ago

This question has already been asked.