scrollTo top of a div
<p>lets say I have this:</p>

<pre><code>var infoBox = $(".info");
</code></pre>

<p>lets say then I am expanding one <code>infoBox</code> and I want the document to scroll to the top of that <code>infoBox</code> sot hat I can see its whole content.</p>

<p>I know i should first find the offset, the distance of <code>infoBox</code> from the top and left of the document and I also know <code>offset()</code> returns <code>top</code> and <code>left</code>.</p>

<p>Is this what should do then?</p>

<pre><code>var offset = infoBox.offset();
$(document).scrollTo(offset.top);
</code></pre>
