How to Check if all Check-boxes are Unchecked with jQuery icheck plugin.

2.8k Views Asked by At

In Short I want to Check if all check-boxes on my table are Unchecked. If yes I will perform an action.

But I am using jQuery iCheck plugin and I didn't find/understand how to do this. They have couple of Call Backs and Methods but I am not sure how to use this to check if all my check boxes are unchecked.

Wanting your kind help anyone familiar with this plugin. Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

http://jsfiddle.net/koa58o4o/10/

$('.select-users').on('ifUnchecked', function (event) {
    //counts the number of selected check-boxes
    // if count=0 hide div
    if ($('.select-users:checked').size() == 0) 
        $('.block').hide();
});