I have the following structure.
Hello World !!
Why not use
$iframe.load(function () { var $body = $('body', $iframe.get(0).contentWindow.document); $body.html(contentDiv); });
instead of timer ?