Responsive Iframes

Responsive Iframes is a tiny jquery plugin (0.9 kb) for making iframes responsive.
IFrames are commonly used to allow embedding of third-party content.
On a responsive website, all page components must be responsive. There are multiple ways of making an IFrame responsive. Some responsive IFrame use-cases can be solved with simple Javascript and CSS. Our library targets a challenging use-case in which embedded content:

Can have unknown width and height

Can have unknown width/height ratio

Can change its width or height as users interact with dynamic content and we want the size of the IFrame to change accordingly to avoid scrollbars.

Making IFrames with such constraints is a challenging task. We developed this tiny (0.9KB minified and gzipped) jQuery plugin, at NPR, to make the task easier.