Multiple execution of after sorting / searching DataTables
Multiple execution of after sorting / searching DataTables
Hi All, I have a code which OnClick triggers a function. It works fine until sorting the columns or searching.
For example if I sort one of the columns first time then the function is executed 2x. If I sort other column then the code is executed 3x,.....
Is that a bug or am I doing something wrong?
Thanks!
Here is the source code:
[code]
var oTable;
$(document).ready(function() {
oTable = $('#example').dataTable( {
//"bProcessing": false,
//"bServerSide": false,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "../ajax_proxy/search_customer_json.php",
"fnDrawCallback": function() {
$('#example tbody td').click( function () {
var aRowNum = oTable.fnGetPosition( this );
var aRow = oTable.fnGetData( aRowNum[0] );
EditShipTo(aRow[0],aRow[9]); // My function which is fired on click and is multiple executed after sorting or searching
});
}
});
});
[/code]
For example if I sort one of the columns first time then the function is executed 2x. If I sort other column then the code is executed 3x,.....
Is that a bug or am I doing something wrong?
Thanks!
Here is the source code:
[code]
var oTable;
$(document).ready(function() {
oTable = $('#example').dataTable( {
//"bProcessing": false,
//"bServerSide": false,
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sAjaxSource": "../ajax_proxy/search_customer_json.php",
"fnDrawCallback": function() {
$('#example tbody td').click( function () {
var aRowNum = oTable.fnGetPosition( this );
var aRow = oTable.fnGetData( aRowNum[0] );
EditShipTo(aRow[0],aRow[9]); // My function which is fired on click and is multiple executed after sorting or searching
});
}
});
});
[/code]
This discussion has been closed.