title: jquery scroll to form input
body: <p>I'm attempting a <code>scrollTo()</code> on a webpage and I want a button to trigger the <code>scrollTo()</code>; it will scroll to the top of the form and highlight the first input field.</p>
  
  <p>My current code works, however the screen quickly flashes. I attempted to use a <code>preventDefault()</code> to no avail. Please see my code below. </p>
  
  <pre><code>$(document).ready(function () {
      $("#get-started").click(function (e) {
          e.preventDefault();
          $('html, body').animate({
              scrollTop: $("#get-risk").offset().top
          }, 2000);
          $("#get-started-apply-now-form [name='last_name']").focus();
      });
  });
  </code></pre>