Javascript loads before iframes
This seems more like a jquery issue then a craft issue. You might look into jquery's load method. Doing a quick google search I came up with this possible solution, which you would need to adapt. 

function callIframe(url, callback) {
    $(document.body).append('&lt;iframe id="myId" ...&gt;');
    $('iframe#myId').attr('src', url);

    $('iframe#myId').load(function() {
        callback(this);
    });
}