Assign scroll animation to focus in jquery
<p>I have the following code which focuses on an input field which has a validation error. I would like to add some sort of animation with the scroll to the focused position (so if you click submit it "scrolls up to where the first input field is which failed validation).</p>

<p>Any ideas?</p>

<pre><code> if(validation_failed == true) {
      $(selected_form).find(":input.validator_element_error:visible:enabled").first().focus();
            return false;
        }
</code></pre>
