$('#example').dataTable( {
"initComplete": function(settings, json) {
alert( 'DataTables has finished its initialisation.' );
}
} );
如何像oLanguange一样扩展initComplete?
$.extend( true, $.fn.dataTable.defaults.oLanguage, {
"sSearch": "<label>Record per page</label> _INPUT_ "
});
答案 0 :(得分:1)
$(document).on( 'init.dt', function ( e, settings ) {
var api = new $.fn.dataTable.Api( settings );
if ( api.init().pageResize ||
$.fn.dataTable.defaults.pageResize )
{
new PageResize( api );
}
} );