Scrolling bottom div with jquery
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3742346/use-jquery-to-scroll-to-the-bottom-of-a-div-with-lots-of-text">Use jQuery to scroll to the bottom of a div with lots of text</a>  </p>
</blockquote>



<p>I have a div where load a number of comments from a database. The div has a height expressed in em not px. It also has enabled the overflow.</p>

<p>When I write a comment and send it recharges I want the scroll to move to the end of the div.
Using <code>$("# boxcoment"). ScrollTop (400)</code> within the succes and working properly I automatically moves the scroll.</p>

<p>But I work with em and want to know if <code>.scrollTop()</code> works with em or if there is another way to scroll down to the end of the div.</p>

<p>I tried also with:</p>

<pre><code>height = $("#boxcoment").height();
$("#boxcoment").scrollTop(height);
</code></pre>

<p>But the scroll just stops halfway.</p>

<p>Thanks</p>
