title: Action after dismiss modal bootstrap
body: <p>I have this function to create my modal:</p>
  
  <pre><code>function modalAlert(text)
  {
      if($('#modalToRemove'))
          $('#modalToRemove').remove();
      $('&lt;div id="modalToRemove" class="modal fade"&gt;&lt;div class="modal-dialog"&gt;&lt;div class="modal-content"&gt;&lt;div class="modal-header"&gt;&lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;x&lt;/button&gt;&lt;h4 class="modal-title"&gt;TITLE&lt;/h4&gt;&lt;/div&gt;&lt;div class="modal-body"&gt;&lt;h4&gt;'+text+'&lt;/h4&gt;&lt;/div&gt;&lt;div class="modal-footer"&gt; &lt;a class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;').modal();
  }
  </code></pre>
  
  <p>And I would like to do an action after closing the modal.
  I tried this code but not working...</p>
  
  <pre><code>$('#myModal').on('hidden.bs.modal', function () {
    // do something…
  })
  </code></pre>
  
  <p>Can you suggest me any thing else?</p>
  
  <p>Thanks!!</p>