Want my scroll bar always at the bottom
<p>My Html Div In Which Chat is in While Loop. So I want My Scroll Always at Bottom But Its Not Working For Me. I'd like some help with a script compatible to the below scripts, any one of them.</p>

<pre><code>&lt;div class="panel-body"&gt; 
</code></pre>

<p>CSS Code</p>

<pre><code>.panel-body {
  padding: 15px;
  height: 350px;
  overflow: auto;
}
</code></pre>

<p>I used two different scripts:</p>

<p>1) </p>

<pre><code>$('.panel-body').scrollTop($('.panel-body')[0].scrollHeight);
</code></pre>

<p>2) </p>

<pre><code>var myDiv = document.getElementByClassName(".panel-body");
myDiv.scrollTop = myDiv.scrollHeight;
</code></pre>