Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Stop iframes delaying page load
// iframes delay page load: cut them out and in to reduce synchronous dependency
function asyncFrames(){
$('iframe').each(function(){
var
markup = $(this).clone(),
guide = $('<b>').replaceAll(this);
// addLoad: https://gist.github.com/1226302
addLoad(function(){
guide.replaceWith(markup)
});
});
};
// Init:
// $(asyncFrames);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment