title: How to print a bootstrap modal popup?
body: <p>Just now I am working on print function using JavaScript to print the content of my website. I can print the content of my site fine with just a direct content. But the problem is that printing the content with bootstrap modal popup seems to be different from what I have done. Below is the printing code of normal content I have implemented.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div id="printArea"&gt;
              &lt;div aria-hidden="true" aria-labelledby="myModalLabel" role="dialog" tabindex="-1" id="mSchedule" class="modal fade"&gt;
                  &lt;div class="modal-dialog"&gt;
                      &lt;div class="modal-content" style="width: 1000px;" &gt;
                          &lt;div class="modal-header"&gt;
                              &lt;button aria-hidden="true" data-dismiss="modal" class="close" type="button"&gt;×&lt;/button&gt;
                              &lt;button type="button" id="printer" class="btn btn-info"&gt;Print&lt;/button&gt;
                              &lt;h4 class="modal-title"&gt;Repayment Schedule&lt;/h4&gt;
                          &lt;/div&gt;
                          &lt;div class="modal-body"  id ="schedule-table"&gt;
  
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>$(document).ready(function(){
      $(document).on('click', '#printer', function (event) {
          event.preventDefault();
          var $print = $("#printArea");
          $(document.body).wrapInner('&lt;div style="display: none"&gt;&lt;/div&gt;');
          var $div = $('&lt;div /&gt;').append($print.clone().contents()).appendTo(document.body);
          window.print();
          $div.remove();
          $(document.body).children().contents().unwrap();
      });
  });
  </code></pre>
  
  <p>I know that this code is working fine with printing normal content, But I have no idea how to print a bootstrap popup modal.</p>
  
  <p>Any help really appreciate.</p>