title: Add class to the body when modal is open
body: <p>I'm having a problem with my login modals. One modal open when someone click forgot password link on my sign in the modal. (One modal open in another modal) So I came everything clean by adding all necessary attributes. 
  Eg: </p>
  
  <pre><code>  &lt;span data-toggle="modal" data-target="#forgot-pin-popup" data-dismiss="modal"&gt;Forgot password?&lt;/span&gt;
  </code></pre>
  
  <p>But I notice it won't add <strong>.modal-open</strong> class to the body when my second modal is open(styles are shown weird without this class). So I manually use this js script.</p>
  
  <pre><code>  $('.modal').on('hidden.bs.modal', function () {
    if($('.modal').hasClass('in')) {
     $('body').addClass('modal-open');
     }    
   }); 
  </code></pre>
  
  <p>Works perfectly <strong>BUT</strong> when I try switching models like 6 times. It won't work again. Can't imagine why. I can't show you an example because it's on my production site. Does anyone face the similar problem like this? </p>