如何使用Google托管的jQuery UI源? [英] How to use Google-hosted jQuery UI source?

查看:61
本文介绍了如何使用Google托管的jQuery UI源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要加载jQuery UI文件,并希望从Google加载它. 目前我上传:

I need to load the jQuery UI files, and would like to do it from Google. Currently I upload:

<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script>
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.droppable.js"></script>

我需要Google提供哪些相应文件?

What are the corresponding files I need from Google?

我可以使用 http://ajax.googleapis .com/ajax/libs/jqueryui/1.7.2/jquery-ui.js ?

此外,改用此代码是否有任何缺点: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js 吗?

Also, is there any disadvantage in using this one instead: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js ?

推荐答案

是的.就这么简单.

 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>

您可以使用Google的加载程序来加载它,但实际上并不需要.

You could use Google's loader to load it but you don't really need to.

使用最小的唯一真正的缺点是代码被压缩,因此如果您想使用调试器逐步调试它,至少很难说.优点远远超过了这一点.在生产中,我会说一定要使用最小的.

The only real disadvantage to using the min one is that the code is compressed so if you wanted to step through it with a debugger, it would be quite difficult to say the least. The advantages far outweigh this though. In production, I would say by all means use the min one.

这篇关于如何使用Google托管的jQuery UI源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆