title: Scroll to top of Bootstrap modal popup
body: <p>Below indicated is my HTML code, its a Bootstrap modal popup. What I am trying to do is if user clicks on save button, I am doing some sort of validation and if the validation fails, the message is displayed and should automatically scroll up to the top of the modal popup. but its not scrolling up. Below I have also indicated my code from JS file.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div id="addD" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="addPatientLabel" aria-hidden="true"&gt;
      &lt;div class="modal-header"&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;×&lt;/button&gt;
          &lt;h3 id="addLabel"&gt;Create&lt;/h3&gt;
      &lt;/div&gt;
      &lt;div class="modal-body"&gt;
          &lt;p class="validateTips"&gt;&lt;/p&gt;
          &lt;table&gt;
              &lt;tr&gt;
                  &lt;td class="TemplateLabel"&gt;
                      Name:
                  &lt;/td&gt;
                  &lt;td align="left"&gt;
                      &lt;input placeholder="name" type="text" name="Name" data-bind="value: NewP.Name" id="SignUpName" class="SignUp text ui-widget-content ui-corner-all" /&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
      &lt;/div&gt;
      &lt;div class="modal-footer"&gt;
          &lt;button class="btn" data-dismiss="modal" aria-hidden="true"&gt;Close&lt;/button&gt;
          &lt;button class="btn btn-primary" onclick="SaveD()"&gt;Save changes&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In my JS file:</p>
  
  <pre class="lang-js prettyprint-override"><code>function SaveD() {
      debugger;
      var bValid = true;
  
      bValid = bValid &amp;&amp; CheckRequired($('#SignUpName'));
      if (bValid) {
          /*Some func called*/
      }
      else
      {
          $('#addD-content').scrollTop(0);
      }
  }
  </code></pre>
  
  <p>Any help? Basically  <code>$('#addD-content').scrollTop(0);</code> is not working.</p>