i use datatables jquery plugin. in datatable have created check box in header , every column has check box too.
that datatable has few pages. need when check header checkbox checkboxes should checked in pages of datatable.
i have access rows of pages @ same time.
i tried this
if($('#selectall').is(':checked')){ $(nrow).find(':input[name=group_select_components]').icheck('check'); }
i can check checkboxes when click paginate. want access row of datatable @ same time..
try below code!!
if($('#selectall').is(':checked')){ var table = $('#yourtableid').datatable(); var cells = table .cells( ":checkbox" ) .nodes(); $(cells).icheck('check'); }
or this
if($('#selectall').is(':checked')){ var table = $('#yourtableid').datatable(); $(':checkbox', table.rows().nodes()).icheck('check'); }
Comments
Post a Comment