Simple Question- How do I directly call a function within jquery.dataTables.rowReordering.js?

Simple Question- How do I directly call a function within jquery.dataTables.rowReordering.js?

LukeSLukeS Posts: 9Questions: 0Answers: 0
edited July 2012 in Plug-ins
Hi,
I am new to javascript so please excuse me for a somewhat stupid question here but how do I directly call a function from within the rowReordering jquery.dataTables.rowReordering.js JavaScript plugin. I want to directly call fnMoveRows() but have been unable to figure out how. I am doing to add buttons to move rows.

I asked the dev, he was very nice and helpful but did I not want to bug him too much. He said to use this code to allow access to the function.
[code]
return this.each(function () {
...
oTable.fnMoveRows = fnMoveRows;
...
}

//Then you should be able to directly call the function
jQuery('#example').fnMoveRows("tbody tr",2,3,"forward",101,"");

[/code]

The "each" after "this" is returning an error. I assign oTable on initialization. This is my init statement
[code]
jQuery(document).ready(function() {
var oTable = jQuery('#example').dataTable().rowReordering();
} );
[/code]


Thanks for any help,
Luke
This discussion has been closed.