title: Do something when modal is closed (Bootstrap)
body: <p>I don't know very much about Javascript, but I've been learning a lot the past few days.</p>
  
  <p>I cannot, for the life of me, figure this one out. </p>
  
  <p>I'm using the modal function in Bootstrap and I've got it working and everything. But now, I want something to happen (insert CSS) once they user closes the dialogue box.</p>
  
  <p>I know how to do the insertion of CSS. How do I initiate it when data-dismiss is clicked?</p>
  
  <p>Thank you.</p>
  
  <p>EDIT: Did I do this correctly? It doesn't seem to work.</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
  $('.testing').click(function(event){
      $('.modal-body').empty();
      if($(event.target).is('#step2')) {
              $('.modal-body').append('&lt;img src="//placehold.it/600x350/449955/FFF" class="thumbnail img-responsive" id="step100"&gt;');
      } else if ($(event.target).is('#step3')) { 
          $('.modal-body').append('&lt;img src="//placehold.it/600x350" class="thumbnail img-responsive" id="step100"&gt;');
      } else { }
  
      $('#modal').modal('show');
      $('#modal').on('hide.bs.modal', function (e) {
              $("#wheel").css("-webkit-animation-play-state","running");
              $(".fa").css("-webkit-animation-play-state","running");
      })
  });
  
  
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Modal code: </p>
  
  <pre><code>&lt;div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&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"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
          &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>FOR FUTURE READERS: Turns out my code was just fine. The problem is that my edits weren't being reflected on the page. WordPress cache issue, I'm assuming.</p>