tags:

views:

132

answers:

1

if found this solution on the web that re-sizes the iFrame on load. I was wondering how I can do this by setting an loop that constantly check's the active iframe's content size then resize it instantly

any ideas on how to do this on Jquery? Thanks!

A: 

You could try putting the code which changes the size of the iframe within the iframe page. When the iframe page loads, it can use jQuery to search for DOM elements within it's parent window. The javascript to do with would look like:

$(function () {
    var height = $(document).height();
    $('iframe', window.parent.document).height(height + 'px');
});
smaglio81
i was more on resizing the height of the iframe when the content of it changes its own height.
Martin Ongtangco