因为大家都知道的原因,google cdn 上的 jQuery 库在国内都挂掉了
我的 WP 上有几个插件都调用了 google 上面的 jquery-ui.min.js,还是不同版本的
GET http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js?ver=1.10.4
GET http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
GET http://ajax.googleapis.com/ajax/libs/jquery/1.10.4/jquery.min.js
看到网上有替换 sae cdn 方法,但是具体在这个场景下的操作不是很明白
请问要把 google 替换成 sae 或 服务器本地上的 库需要怎么写
因为插件会不断更新,可以把代码写在主题模板上的 footer 里面吗
照着帖子写了
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="//lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js"><\/script>')</script>
但是好像没效果,而且多个版本 jquery.min 也不知道怎么处理
谢谢
我的 WP 上有几个插件都调用了 google 上面的 jquery-ui.min.js,还是不同版本的
GET http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js?ver=1.10.4
GET http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
GET http://ajax.googleapis.com/ajax/libs/jquery/1.10.4/jquery.min.js
看到网上有替换 sae cdn 方法,但是具体在这个场景下的操作不是很明白
请问要把 google 替换成 sae 或 服务器本地上的 库需要怎么写
因为插件会不断更新,可以把代码写在主题模板上的 footer 里面吗
照着帖子写了
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="//lib.sinaapp.com/js/jquery/1.9.0/jquery.min.js"><\/script>')</script>
但是好像没效果,而且多个版本 jquery.min 也不知道怎么处理
谢谢