tags:

views:

124

answers:

1

Hey everyone-

I am wondering if there is an init function in jquery.I am loading some widgets (just simple divs with content) on document.ready(). I would rather preload everything FIRST and then render the page. Instead of loading all the non asych elements first and then the ajax components next, as this is causing a bit of a "flash" when the page loads.

Any ideas?

+2  A: 

You can load in the section you don't want to have a flash outside the visible area of the page load (like with a negative margin) and then move it into the correct space on your page on the load event of the element group.

Alex Sexton