Triggering a JavaScript click() event at specific coordinates
Set the pageX
and pageY
properties (which are normalized) on the event object and pass it to .trigger()
, like this:
var e = new jQuery.Event("click");
e.pageX = 10;
e.pageY = 10;
$("#elem").trigger(e);