How to make a div element scroll to the top of the page
<p>Assume that I have ten paragraphs of text and there is edit link next to each of paragraph. When I click on 'edit' the contents of the paragraph is available for editing.</p>

<p>So I have </p>

<pre><code>&lt;p id='p1'&gt;data for p1&lt;/p&gt;
&lt;p id='p2'&gt;data for p2&lt;/p&gt;
&lt;p id='p3'&gt;data for p3&lt;/p&gt;
&lt;p id='p4'&gt;data for p4&lt;/p&gt;
</code></pre>

<p>If I click on 'edit' to edit p3 then text area appears at the very bottom. So right now I see data for p1, data for p2 and just the top of the form for p3. data for p4 is not visible and is below the viewport.</p>

<p>Is there a way in jQuery so that the edit form appears at the top of the page every single time. </p>

<p>I am not trying to use fixed position or anything. The order should still be there. However in this case the data for p1 and p2 should be above the page and not visible. The form for p3 and data for p4 should appear on the page.</p>
