title: Scrolling down and back up with bootstrap
body: <p>I have a collapse form that's almost at the bottom of the page and the problem is that when it's opened the user will have to scroll down to completely see it. Is there a way to have it automatically scroll down when opened and even better have it scroll back up when closed if that's possible?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;style type="text/css"&gt;
      .bs-example{
          margin: 20px;
      }
      .table-nonfluid {
          width: auto !important;
      }
  &lt;/style&gt;
       &lt;div class="container"&gt;
        &lt;button  type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo"&gt;Status Updates&lt;/button&gt;
        &lt;div id="demo" class="collapse"&gt;
  
  
      &lt;div class="bs-example"&gt;
      &lt;table class="table table-bordered table-nonfluid"&gt;
      &lt;thead&gt;
      &lt;tr&gt;
      &lt;th&gt;Time&lt;/th&gt;
      &lt;th&gt;Update&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
  
      &lt;tr class="active"&gt;
      &lt;td&gt;Jan 5&lt;/td&gt;
      &lt;td&gt;Demo 2&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;tr class="active"&gt;
      &lt;td&gt;Jan 4&lt;/td&gt;
      &lt;td&gt;Demo 1&lt;/td&gt;
      &lt;/tr&gt;
  
      &lt;/tbody&gt;
      &lt;/table&gt;
      &lt;/div&gt;
  </code></pre>