title: How to close Bootstrap 3 modal programmatically on AJAX success?
body: <p>I have a code that what I wanted to do is to close the modal on ajax success. This is my code:</p>
  
  <p><strong>script</strong></p>
  
  <pre><code>success: function() {
      console.log("delete success");
      $('#deleteContactModal').modal('hide');
      $( "#loadContacts" ).load( "/main/loadContacts" );
  
  }
  </code></pre>
  
  <p><strong>html</strong></p>
  
  <pre><code>&lt;div class="modal fade" id="deleteContactModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"&gt;
    &lt;div class="modal-dialog modal-sm" role="document"&gt;
      &lt;div class="modal-content"&gt;
  &lt;!--everything goes here --&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Everything just works except when the code <code>$('#deleteContactModal').modal('hide');</code> triggers, it just shows a black faded screen like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Ooyf6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Ooyf6.png" alt="enter image description here"></a></p>
  
  <p>The modal closes but the black faded color is still present. Am I missing something here? Thank you in advance.</p>
  
  <p>I'm using <strong>bootstrap 3.3</strong>.</p>