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:
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
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:
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