TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What to do when Ajax is faster than CSS

1 点作者 pwoods超过 16 年前
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 条评论

shutter超过 16 年前
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.
noodle超过 16 年前
are you using $(document).ready() ?
pwoods超过 16 年前
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 未加载