$('<img />')
.attr('src', val)
.attr('width', "400")
.load(function(){
$('.showdata').append( $(this) );
}
);
This works perfectly for images, how would this convert 1:1 to iframes? Here quick jsfiddle: http://jsfiddle.net/ET8Gw/
http://jsfiddle.net/ET8Gw/5/
Try something like this:
It will not work cross domain.
I got it working doing this
jsFiddle: http://jsfiddle.net/ET8Gw/22/
Unlike Image objects, IFrames will not load until they are part of the DOM.
To get around this you can hide the element, add it to the DOM, and when the load event fires show it:
http://jsfiddle.net/ET8Gw/1/