title: Bootstrap Modal - resize modal based on iframe height
body: <p>I need to resize this <code>bootstrap</code> modal based on the height of the <code>iframe</code> content because it is dynamic. </p>
  
  <p>Using an <code>onload</code> and the following function I am getting nothing.</p>
  
  <pre><code>window.resizeIframe = function () {
           var frame = $('#custom-frame');
           var modalHeight = $('#custom-frame').contents().height();
           frame.height(modalHeight);
  
           $(window).resize(function() {
              frame.height(modalHeight);
           });
        };
  </code></pre>
  
  <p>I've provided a plunker:
  <a href="http://plnkr.co/edit/eElqXJwvxmpc1XMrdwIK?p=preview" rel="nofollow">http://plnkr.co/edit/eElqXJwvxmpc1XMrdwIK?p=preview</a></p>