I need to use jQuery (or anything) that clicked specific coordinates after button is clicked.
Here is my code, but It not working. As you see in picture in these coordinates (10,15) is red button, which should be clicked.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script>
$(function(){
$("#filter").click(function(e){
//If I add alert here It successfully print message.
var e = new jQuery.Event("click");
e.pageX = 10;
e.pageY = 15;
$("#elem").trigger(e);
});
});
</script>
<input type="button" id="filter" name="filter" value="Filter" />
I've read this, but wont help: Triggering a JavaScript click() event at specific coordinates