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");
精彩评论