JSFiddle - React, Tailwind, and code Playground
by Sean Wessell
HTML
<table>
<tr><td>test</td></tr>
</table>
<p id="result">
no action logged
</p>
<button id="trigger">
manually trigger mousemouse
</button>
CSS
table {
width:100%
border:1px solid grey;
}
JavaScript
$('table').on('mousemove', function(e) {
var is_dragging = e.buttons > 0 || e.buttons == undefined && e.isTrigger == 3;
// is_dragging should === true;
$('p').html(is_dragging.toString())
});
$('#trigger').click(function(){
$('table').trigger('mousemove');
})