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);
More Related Contents:
- jQuery click anywhere in the page except on 1 div
- How do I detect a click outside an element?
- Definitive way to trigger keypress events with jQuery
- jQuery click events firing multiple times
- Can I call jQuery’s click() to follow an link if I haven’t bound an event handler to it with bind or click already?
- $(document).click() not working correctly on iPhone. jquery [duplicate]
- Why is this jQuery click function not working?
- Need to cancel click/mouseup events when double-click event detected
- How to get JQuery.trigger(‘click’); to initiate a mouse click
- What the difference between .click and .change on a checkbox [duplicate]
- How to stop default link click behavior with jQuery
- jQuery: keyup event for mobile device
- Difference between .click() and actually clicking a button? (javascript/jQuery)
- JavaScript: Invoking click-event of an anchor tag from javascript
- Jquery: mousedown effect (while left click is held down)
- Registering jQuery click, first and second click
- How to remove all click event handlers using jQuery?
- Programmatical click on -tag not working in Firefox
- Is there an equivalent to e.PageX position for ‘touchstart’ event as there is for click event?
- jQuery .on() method doesn’t see new elements
- Cancel click event in the mouseup event handler
- Why isn’t my checkbox change event triggered?
- Uncaught ReferenceError: Invalid left-hand side in assignment
- Matching text field value with array value
- Direct vs. Delegated – jQuery .on()
- toggle show/hide div with button?
- Is setTimeout a good solution to do async functions with javascript?
- Find HTML based on partial attribute
- Queue AJAX calls
- What is the difference between $(document).ready(function() and $(function() ?