Onchange not working on next page Datatable

I am using checkbox on every row to do multi delete record in datatable. I want to show delete button only if any checkbox is checked. On first page, onchange is working. But on second page so on, onchange not working.

Below is my code :

$(".isdt-selected").on("change", function() {
      $(".isdt-selected").each(function(index, elem) {
        if($(elem).is(':checked')){
          $('#btn-delete-bulk').show();
          return false;
        }else{
          $('#btn-delete-bulk').hide();
        }
      });
    });

30 thoughts on “Onchange not working on next page Datatable”