首页 > 解决方案 > datatable.colReorder 未定义

问题描述

绘制后我需要更改列顺序。这是我所做的

$(document).ready(function () {
    var $datatable = $('.dataTable').DataTable();
    $datatable.on( 'draw', function () {
        console.log( "DONE" );
        $datatable.colReorder.move( 4, 2 );
    } );
});

输出如下

 DONE view:1972:21
 TypeError: $datatable.colReorder is undefined

标签: javascriptdatatable

解决方案


推荐阅读