pre-row-reorder

Since: RowReorder 1.2.1

A row reordered action has been initiated by the end user. Please note - this property requires the RowReorder extension for DataTables.

Description

When using RowReorder you may wish to know when a user starts a row reorder action. This event provides that ability.

This event is triggered when a user grabs a row for reordering, before it is moved.

Please note that, as with all DataTables emitted events, this event is triggered with the dt namespace. As such, to listen for this event, you must also use the dt namespace by simply appending .dt to your event name, or use the on() method to listen for the event which will automatically append this namespace.

Type

function function( node, position )

Parameters:

Example

Log when row reorder action is started:

var table = $('#example').DataTable( {
	rowReorder: true
} );

table.on( 'pre-row-reorder', function ( node, index ) {
	console.log( 'Row reorder started: ', node, index );
} );