$(window).load(function()-how it works with FF
<p>I have a jquery code.</p>

<pre><code>$(window).load(function() {
    document.title = $("#myid").text(); //not working in FF
});
</code></pre>

<p>Here I have used $(window).load(function() because in the #myid I am getting value through another javascript,  if I use ready(), its giving me error. so I am first loading the window then start reading value.
Now in IE, after the window loads itself , I am getting the value of  document.title,
but for FF its coming as blank.undefined.
Why? any idea or alternate sln.</p>
