datatables - jQuery delegate each function -


i using jquery datatable display list of options. table consists of multiple pages , users have option de-select/select options datatable entries using checkbox. able initiate delegate event on checkboxes, however, problem when have option de-select/select checkboxes, works first page. other checkboxes still remain selected. not sure, how delegate pages. can please throw light here. here code:

$('body').delegate('[name="selectall"]', 'change', function () { if($(this).is(':checked')){ $('[name="all_barcodes[]"]').each(function(){         this.checked = true;     });  }else{ $('[name="all_barcodes[]"]').each(function(){         this.checked = false;     });  }  }); 

thank you.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -