<p>I am creating a chat using Ajax requests and I'm trying to get messages div to scroll to the bottom without much luck.</p>
<p>I am wrapping everything in this div:</p>
<pre><code>#scroll {
    height:400px;
    overflow:scroll;
}
</code></pre>
<p>Is there a way to keep it scrolled to the bottom by default using JS?</p>
<p>Is there a way to keep it scrolled to the bottom after an ajax request?</p>

Here's what I use on my site:
```
```
var objDiv = document.getElementById("your_div");
objDiv.scrollTop = objDiv.scrollHeight;
```
```