Say I have this code:
var jqiFrame = $('<iframe name="jqiframe" id="jqiframe" src="about:blank"></iframe>');
$('body').append(jqiFrame);
jqiFrame.load(function() {
// Some code
});
How can I make it so that the .load function only kicks off when the iFrame is actually loaded, vs. when it is appended to the body empty?
You could not set the src attribute initially but do it later.
You could also just move your load before the append.