I am trying to perform operations on a popup DOM, but for some reason, the ready event fires immediately for the popup before anything in the DOM.
I know that jQuery can access the DOM of the popup using the context, and that I can do this using setTimeout to delay any action until a reasonable amount of time has passed.
http://jsfiddle.net/GVcjn/
(function ($) { $(function () { var popup = window.open('/test');
Also, I know this is not a jQuery bug. If I add console.log(popup.document.readyState); immediately after var popup = window.open('/test'); he prints complete . Why really?
Any tips?
Thanks!
source share