Window scroll position when the page is fully loaded
<p>I would like to know window scroll position when a page is fully loaded.</p>

<p>When I click on a link with id, page is loaded according to element with this id.When page is loaded, I would like to know window position.</p>

<p><strong>index.html</strong></p>

<pre><code>&lt;a href="page.html#2012_8"&gt;link&lt;/a&gt;
</code></pre>

<p><strong>page.html</strong></p>

<pre><code>&lt;script&gt;
$(window).load(function(){
    console.log($(window).scrollTop());
});
&lt;/script&gt;

&lt;p id="2012_8"&gt;This is some text in a paragraph.&lt;/p&gt;
</code></pre>

<p>When I click on link, console log get 0. When I refresh page.html, console log get correct window scroll position. Why? Thanks for any help.</p>
