开发者

Load iFrame at Margin: -9999px; Move iFrame Margin to +20px after 5 seconds

As the title says, I want to load an iFrame out of the visible window, at margin:-9999px; and then move it into the visible window after a 5 second delay.

This is because I am performing a function on the iFrame and don't want users to see it until that function is complete.

The code I am running is this:

jQuery(window).load(function(){jQuery(".Remover").find("p, ul").remove()});
          jQuery(window).load(function(){jQuery(".footnote").find("*").remo开发者_如何学Pythonve()});

If I can tell the browser not to show the result until the above is complete that would also be acceptable.

Thanks for any help!


Give your iframe visibility hidden (via css or explicit styling):

iframe {visibility: hidden;}

then after your load is complete inside the frame you can set it to visible:

$(window.frameElement).css("visibility", "visible");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜