call a function in success of datatable ajax call

后端 未结 10 1957
难免孤独
难免孤独 2020-12-29 01:44

Is that possible to invoke a javascript function in success of datatable ajax call. Here is the code am trying to use,

var oTable = $(\'#app-config\').dataTa         


        
10条回答
  •  春和景丽
    2020-12-29 02:29

    For datatables 1.10.12.

    $('#table_id').dataTable({
      ajax: function (data, callback, settings) {
        $.ajax({
          url: '/your/url',
          type: 'POST',
          data: data,
          success:function(data){
            callback(data);
            // Do whatever you want.
          }
        });
      }
    });
    

提交回复
热议问题