How can I simulate an anchor click via jquery?
What worked for me was: $(‘a.mylink’)[0].click()
What worked for me was: $(‘a.mylink’)[0].click()
I answered a similar question (see Javascript callback when IFRAME is finished loading?). You can obtain control over the iframe load event with the following code: function callIframe(url, callback) { $(document.body).append(‘<IFRAME id=”myId” …>’); $(‘iframe#myId’).attr(‘src’, url); $(‘iframe#myId’).load(function() { callback(this); }); } In dealing with iframes I found good enough to use load event instead of document … Read more