so I was able to trigger a click event on a span from another window using:
var openerBody = $(window.opener.document.body);
$('.thespan', openerBody).click();
but then when I change that span object to an <a> tag, the click trigger stops working…
Is there a way to trigger a click event from another window on an <a> tag?
Some browsers won’t allow you to call
clickon anatag, to prevent you form over-manipulating the user’s browser. But you can use thehrefattribute to redirect the user.