jquery datatable , can not set the extra pluin functions:

if you use oLanguage settings, because the language file is in aSync mode (load the file dynamically), the plugin function will not be token in consideration. But u can append the plugin after fnInitComplete: like this:
    var Dtable=$('#data_list_table').dataTable({
        "oLanguage": {
            "sUrl": dtLang
        },
        "sExtends": "text",
        "sButtonText": "Clear Search",
        "bAutoWidth": false,
        "aoColumns": aoColumns,
        "sSortAsc": "header headerSortDown",
        "sSortDesc": "header headerSortUp",
        "sSortable": "header",
        "bProcessing": true,
        "bServerSide": true,
        "sAjaxSource": searchUrl,
        "aaSorting": [[ 0, "desc" ]],
        "fnClick": function (nButton, oConfig, oFlash) {
            oUserTable.fnFilter('');
            oUserTable.fnDraw();
        },
        "fnInitComplete": function(oSettings, json) {
            Dtable.fnSetFilteringDelay(3000);
            if (typeof searchTitle === 'undefined') {
                return true;
            }
            oSettings.oLanguage.sSearch = searchTitle;

            return true;
        }
    });

the fnSetFilteringDelay will ok.

评论

热门帖子