I need a JavaScript code to make mouse double click by itself. I will use it inside my Java code . This one is a selenium project for testing-purposes but there is not any way t
As Mozfet says JQuery ! it's so easy with JQuery !
$("#myId").trigger('dblclick');
then you listen for this double click
$("#myId").on('dblclick',function(){
// do it !
});
// you can event make you own event
$("#myId").trigger('retrieve');
then you listen for this custom event
$("#myId").on('retrieve',function(){
// do it !
});
I often use it in datatables : I've got a popover (a small menu on the left td of each row) if the user choose "open modal" i then trigger a double click which goes to the table which is already waiting for a double click from the user on the row. So i don't need to implement 2 events