I’m writing an iOS app that has an offscreen uiwebview, and to be able to interact with it, I need to simulate mouse clicks in JavaScript. I’ve managed to use $(document.elementFromPoint(x, y)).click(); to be able to click on JavaScript buttons, but I need a way to be able to click on a hyperlink using some kind of coordinate. Is this possible?
I’m writing an iOS app that has an offscreen uiwebview, and to be able
Share
I think you can initiate a click event on
<a>links by the following code:Demo: http://jsfiddle.net/7herR/2/
Not sure about browser compatibilities, but tested on Firefox at least.