如何从 CDN 扩展 jQuery? [英] How to extend jQuery from CDN?

查看:28
本文介绍了如何从 CDN 扩展 jQuery?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用的 jQuery 与其他 Web 文件一起驻留在我自己的 FTP 上.自从 YSlow 建议以来,我正在考虑使用 CDN 中的 jQuery.问题是,我怎样才能扩展那个 jQuery?或者换句话说,我如何向它添加自定义函数?我不认为我可以编辑那个?哈哈!谢谢!

解决方案

您使用一个单独的文件,其中包含您自己的功能.

对 jQuery 的任何扩展都应该通过它自己的插件机制来完成.>

I'm currently using a jQuery resides on my own FTP together with other web files. I am thinking of using a jQuery from CDN since suggested by the YSlow. The question is, how can I extend that jQuery? Or in other words, how can I add custom functions to it? I don't think I can edit that? Ha-ha! Thanks!

解决方案

You use a separate file with your own functions in it.

Any extension to jQuery should probably be done through its own plug-in mechanism.

这篇关于如何从 CDN 扩展 jQuery?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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