[jQuery] weird issue with ready event

[jQuery] weird issue with ready event


Hello,
I'm trying to set the html content of a DIV (id='list') which sits in
a page opened with window.open :
var pop = window.open("PrintList.aspx");
$(pop.document).ready(function() {
$("#list", pop.document).html("hello");
});
As you can see, the string 'hello' should be written to the DIV once
the page is loaded. Yet the first time I execute this script the
string is never written. If I close the new window and I execute the
script again, it will work. It's only the first time I execute it....
how weird..
Does anyone know why ?
Thanks