views:

149

answers:

2

I have stumbled upon a bug in Safari on iPad.

$('#next_proj a').trigger('click');

.. does not seems to click on the actual link.

Any clues?

A: 

It may not be a bug. My guess is that they did not want to allow javascript emulated user clicks.

jdc0589
A: 

I got this to work by doing this...

var el = $('#next_proj a').get(0);
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
el.dispatchEvent(evt);

Hope it helps...

ad rees