码迷,mamicode.com
首页 > Web开发 > 详细

DataTable.NET的event執行順序

时间:2019-07-30 09:25:42      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:nis   response   null   click   javascrip   ons   process   ==   json   

var dataTable = $(‘#table‘)
.on( ‘processing.dt‘, function ( e, settings, processing ) {
    $(‘#loading_overlay‘).css( ‘display‘, processing ? ‘block‘ : ‘none‘ );
    if (!processing && dataTable  != null) {
        console.log("processing finished.")
    }
})
.on(‘xhr.dt‘, function ( e, settings, json, xhr ) {
    console("xhr event: ajax responsed");
    if (json["success"] == true) {

    }
})
.on( ‘page.dt‘, function () {
    console("paging processed.");
})
.on( ‘draw.dt‘, function () {
    console("draw processed.");
})
.on( ‘init.dt‘, function () {
    console("init processed.");
})
.on( ‘click‘, ‘tbody td‘, function () {
})
.DataTable({ 
     // settings....
});

當頁面第一次load

processing.dt (processing == false) => xhr.dt => page.dt => draw.dt => init.dt => processing.dt (processing == true)

當換到另外一頁

processing.dt (processing == false) => xhr.dt => page.dt => draw.dt => processing.dt (processing == true)

DataTable.NET的event執行順序

标签:nis   response   null   click   javascrip   ons   process   ==   json   

原文地址:https://www.cnblogs.com/sipher/p/11267534.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!