In a perfect world the things out of your control (ads, feeds, etc) would themselves be loaded after domReady into their placeholder markup. A slow loading Ad shouldn't be able to cripple the site while it loads, but anyway to expand on your topic.
4) Set a class on the Dom elements called 'jscript' or something that either hides or otherwise marks the content as not ready(disabled, grayed,etc) and once the Dom is ready use Javascript to remove the class 5) Redesign your pre javascript markup so it's somewhat usable and only use javascript to expand upon the behavior (this is really the best approach but not always practical if you use heavy script) I would recommend not trying to get tricky with snippets of script outside the domReady though. Too easy to have race conditions or otherwise hard to track down problems. On Apr 23, 12:13 pm, hedgomatic <hedgoma...@gmail.com> wrote: > While virtually every site in existence trumpets using the jQuery DOM- > ready shortcut as an absolute must, I've come across situations which > I feel frustrate the user, particularly when using jQuery to create a > navigational element. > > I often work on sites which are going to have a lot of external > content (ads, feeds, analytics), and if even one of them is sluggish > to load, none of my interactive elements are responsive for that time. > > There seem to be three options: > > 1] liveQuery (disadvantage: overhead) > 2] popping a loading message over the whole page (disadvantage: > ridiculous) > 3] nesting an image inside the portion of the DOM we need, and using > an onLoad event (disadvantage: poor semantics). > > Anyone else come across any novel ways around this seemingly under- > discussed issue?