title: Hide Bootstrap modal with fade out effect using Javascript
body: <p>I have a basic bootstrap modal to log in, which doesn't close itself when I hit submit. I solved it using <a href="https://stackoverflow.com/questions/23615549/bootstrap-modal-not-closing-on-form-submit-rails">this simple jquery</a>:</p>
  
  <pre><code>$('#myModal').modal('hide');
  </code></pre>
  
  <p>But I also want the modal to fade out properly using bootstrap's fade class - which currently doesn't happen, it instantly gets hidden.</p>
  
  <p>How can I do this?</p>