How to detect a row double click?
How to detect a row double click?
kolban
Posts: 5Questions: 2Answers: 0
I have a desire to display a table of data and perform an action when a user double clicks upon a row. Is there a recipe or technique that can be used to detect a double click event on a row and determine upon which row the action was performed?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
I would suggest you use a jQuery event handler for the
dblclick
event. This example shows a standard single click.Allan
So basically replace 'click' in the example Allan linked with 'dblclick' as shown bellow.
$('#example tbody').on('dblclick', 'tr', function () {
var data = table.row( this ).data();
alert( 'You clicked on '+data[0]+'\'s row' );
} );
Thank you allan and Jonathan501. That is exactly what I was looking for. Thank you again SO much.