datatables jquery click event not working after pagination

后端 未结 6 1088
轮回少年
轮回少年 2020-12-17 08:50

I am using http://datatables.net/


I trigger ajax call

6条回答
  •  情深已故
    2020-12-17 09:18

    $("#product-list").on("click",".btn-delete-product",function(e){
        e.preventDefault();
        var prodId     =   $(this).attr("product-id"); 
        .... code to delete the record from the db...
      });
    

    product-list is the table where data gets loaded and has paging enabled.

    This works perfectly for me.

提交回复
热议问题