Skip to content

Instantly share code, notes, and snippets.

@muthu32
Created December 30, 2016 11:37
Show Gist options
  • Save muthu32/786f99701044396853c8840ef3a7bb8b to your computer and use it in GitHub Desktop.
Save muthu32/786f99701044396853c8840ef3a7bb8b to your computer and use it in GitHub Desktop.
//following script ussed to get data from td of Jquery Datatable.
$('#table tbody').on( 'click', 'td', function () {
var data = table.cell(this).data(); //td element data
var column = table.cell( this ).index().column; //column index
var row = table.row( this ).index(); // Row index
var rowid = $(this).closest('tr').attr('id'); //Get Row Id
var columnvisible = table.cell( this ).index().columnVisible //visble column index
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment