skeets.iframe-resize

auto resize iframe so that it fits content

Usage no npm install needed!

<script type="module">
  import skeetsIframeResize from 'https://cdn.skypack.dev/skeets.iframe-resize';
</script>

README

skeets.iframe-resize

Make iframe resize itself to fit content

Install

npm install skeets.iframe-resize

(requires jQuery)

Usage

Call this function with your iFrame element:

iFrameResize($("iframe"), options);

Options

The following are all optional.

direction - Set to "up" to have the iFrame expand up instead of down.

container - Required if the direction is "up". Set to the selector of the parent element that scrolls.

License

ISC