Of course you can use the jQuery trigger () function.
$('#recover').trigger({ type: 'mousedown', which: 3 });
Depending on what you are doing, you can program a mouse, and then a mouse, which may look like this:
$('#recover').trigger({ type: 'mousedown', which: 3 }).trigger({ type: 'mouseup', which: 3 });
I am not a big fan of such long teams, but everything that is most readable for your application is wonderful.
source share