Skip to content

Instantly share code, notes, and snippets.

@Paxa
Created July 31, 2009 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Paxa/159210 to your computer and use it in GitHub Desktop.
Save Paxa/159210 to your computer and use it in GitHub Desktop.
$$('.to_frame').each(function (el) {
var html = el.get('html');
var myIFrame = new IFrame({
src: '',
styles: {
width: el.getStyle('width'),
height: el.getStyle('height').toInt() + 3,
border: 0,
padding: 0
}
});
el.empty();
myIFrame.inject(el, 'after'); //l.replaces(myIFrame);
myIFrame.contentWindow.document.open();
myIFrame.contentWindow.document.write(html);
$(myIFrame.contentWindow.document.body).setStyles({margin: 0, padding: 0, border: 0});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment