This is jQuery iFrame, a plugin to help you set iframe source and squirt content into iframes, by Michael Mahemoff, under MIT License. It gives you a callback so you know when the frame has been loaded, tells you how long it took to load, and provides timeout support.
Load http:// | |||
with timeout | ms | ||
$("iframe").src(url, optionalCallback, options);
$("iframe").squirt(html, optionalCallback, options);
Options are:
$("<iframe/>").src("http://google.com").appendTo("body");
$("iframe").squirt("a <em>little</em> content");
$("iframe").src("http://google.com", function(iframe, duration) {
alert("That took " + duration + " millis.");
}, {
timeout: function() { alert("oops! timed out."); },
timeoutDuration: 10000
});