scrollTo across multiple pages
<p>I have jQuery <code>scrollTo</code> working on a single page of a website, by calling each elements' <code>id</code> which activates the scroll.</p>

<p>What I would like to do is include elements on another page, which when the the link in the menu is clicked, loads the new page and scrolls to the correct element.</p>

<p>For example if my contact section is at the bottom of "page 1" but I am on "page 2". I would like to be able to click contact in the menu and it load "page 1" and then scroll to the contact section at the bottom.</p>

<p>The current script and code I am using are the following:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function goToByScroll(id){
        $('body').animate({ scrollTop: $("#"+id).offset().top },'slow');
    }
    var hash = window.location.hash;

    setTimeout(function(){
        goToByScroll(hash);
    }, 300);
&lt;/script&gt;
</code></pre>

<p>The navigation link is:</p>

<pre><code>&lt;a href="javascript: void(0)" onClick="goToByScroll('contact')"&gt;contact&lt;/a&gt;
</code></pre>

<p>How can I do this?</p>
