Reputation: 3193
I think I know the answer to this, but want to make sure I've not missed something...
I have a webpage that has a small, flash logo animation at the top of the screen. I've kept it minimal and it's just a logo, so no critical navigation or anything silly in there. Because it's the first large element to load however, it's sometimes hangs the page a bit and slows everything else down.
Is there a way to tell it the page to load that flash element last? It's the only flash element and I've already implemented jquery on the page (I don't know if that gives me an option?)
Thanks in advance!
Upvotes: 2
Views: 1456
Reputation: 34652
You might set an event listener for the page's onload
event and then have the flash load.
Excuse the pseudo-code. I'm not fluent in jQuery.
document.body.onload = function()
{
var element = $('#flash_container');
element.src = 'flash.swf';
}
Upvotes: 1
Reputation: 196236
You should use swfobject and/or jquery to embed the flash (in other words dynamically embed) after the document has completed loading or the DOM is ready (whatever suits your needs).
Upvotes: 0
Reputation: 1551
I'm no expert but... You could try wrapping it in a div and placing it last in your html code.
If it sits at the top then position: absolute; top: 0;
could be fairly straight forward.
Upvotes: 0