TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

What to do when Ajax is faster than CSS

1 pointsby pwoodsover 16 years ago
I have a jQuery enabled application that is running too fast for the Stylesheet to load. I can't figure out how to have the javascript run when the styles are all done.<p>Here is my page order<p>HTML HEAD JAVASCRIPT CSS - One file with includes TEXT FOOTER<p>Any suggestions? I can reorder it but I'd like a clean solution maybe with something to do with the browser.<p>Paul

3 comments

shutterover 16 years ago
The CSS should go in the head, and the Javascript can be placed at the very end of the page right before the closing body tag.<p>Failing that, you can put the JS right below the CSS in the head tag.
noodleover 16 years ago
are you using $(document).ready() ?
pwoodsover 16 years ago
Yes I am using the Document ready. It may not be that the CSS is loading slow but I have my doubts when I refresh and it operates the same.
评论 #293329 未加载