title: How can I scroll the page to an element after being re-directed from another page?
body: <pre><code>&lt;script&gt;
      $(document).ready(function () {
          $("#button").click(function () {
              window.location.href = "page2.aspx"; 
  
              $('html, body').animate({ 
                  scrollToElement ("#div").offset().top 
              }, 2000); 
          }); 
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>The idea, is that you click a button on page1, then you get redirected to page2 and then you scroll to a specific element using jQuery.</p>