jQuery DataTables: Column reordering and resizing


jQuery DataTables already has official plug-in for column reordering ColReorder. But if you need the ability to resize columns, you may want to use ColReorderWithResize instead.

Plug-in can be initialized multiple ways:

  1. Using dom option and adding character R.

    var table = $('#example').DataTable({
        'dom': 'Rlfrtip'
  2. Using new $.fn.dataTable.ColReorder().

    var table = $('#example').DataTable();
    new $.fn.dataTable.ColReorder(table);


You Might Also Like

Leave a Reply

You may use simple HTML to add links or lists to your comment. Also use <pre><code class="language-*">...</code></pre> to mark up code snippets. We support language-js, language-markup and language-css for comments.