本文介绍了如何更快地加载JQuery?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有带jquery的aspx.由于加载jquery的延迟,我遇到了一些样式问题.请任何人告诉我如何非常快速地加载jquery.

I am having aspx which has jquery. Due to delay in loading jquery I am facing some style issues. Please can anyone tell me how to load jquery very fast.

推荐答案

我今天阅读了Stackoverflow上的Sam Saffron的博客文章,内容与此主题有关.我还没有尝试作者的小费,所以我无法确认.

I read a Blog post by Sam Saffron from Stackoverflow on this topic today. I didnt try out the authors tipps yet though so I cant confirm.

http://samsaffron.com/archive/2012/02/17/stop-paying-your-jquery-tax

tl; dr;是将jquery推送到页面的页脚,并在页眉中定义一个$ .ready函数,该函数捕获由于jquery直到实际的$ .ready函数被加载才加载而无法运行的所有脚本.

the tl;dr; is to push jquery to the footer of the page and define a $.ready function in the header which captures all the scripts that couldnt yet be run because jquery didnt load until the actual $.ready function is loaded.

这篇关于如何更快地加载JQuery?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 08:25