Resize Iframes seamlessly

Responsive Iframes: resize iframes seamlessly
Recently I came across a very interesting solution to resize iframes seamlessly in the page. Iframes can be on same domain or cross domain. Its iframe-resizer maintained by David J. Bradshaw.

This solution works with the cross-document messaging; window.postMessage (IE8+). Though for IE8 support, ie8 polyfill(supplied with plugin) would need to used.

Only requirement is that the iframe.contentWindow.js(supplied with plugin) is needed to be included in the iframed page.

For IE8 conditional script can be used as follows:

For minimal setup, you would need to call the

And in iframedPage.html should have the iframeResizer.contentWindow[.min].js

Demo Github npm Download


Got Something To Say:

Your email address will not be published. Required fields are marked *

*