javascript - Uncaught TypeError: $.fn.dataTable.ColReorder is not a function -


i'm using data table plugin implementation.as reorder columns in data table using col-reorder plugin.

var colreorder = new $.fn.datatable.colreorder( table ); var order=colreorder.fnorder(neworder); 

am using data table plugin version(1.9.4) , col reorder version(1.0.8)

$.fn.datatable.colreorder introduced in colreorder 1.1.0! 1.1.0 major release included :

  • colreorder available under $.fn.datatable.colreorder
  • amd module , bower support (datatables-colreorder)
  • the ability set defaults using $.fn.datatable.colreorder.defaults
  • camelcase notation support match datatables 1.10

so upgrade 1.0.8 1.1.0!
working demo, datatables 1.9.4 , colreorder 1.1.0 → http://jsfiddle.net/gs1toxty/


if reason not able upgrade colreorder 1.1.0, or insists on using 1.0.8, add r flag (r colreorder) sdom string :

var table = $('#example').datatable({     sdom: 'rlfrtip' });  

demo → http://jsfiddle.net/l6nogwll/
exact same 1.1.0's new $.fn.datatable.colreorder(table) ...


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -