Select All Checkboxes

    $('input[name="check_all"]').on('click', function(e){
        //$('#datatable')
        var $this = $(this);
        //console.log($this.prop('checked'));
        
        //Get all rows of datatable
        var nNodes = $('input[name="users[]"]', d_table.fnGetNodes());
        //nNodes.prop('checked', true);
        //console.log(nNodes);
        //return;

        if($this.prop('checked') == true){
            nNodes.prop('checked', true);
        }else{
            nNodes.prop('checked', false);
        }
    });

Reference: