jquery-tools fallback if CDN fails

血红的双手。 提交于 2019-12-11 03:34:36

问题


I'm using the for falling back and serving jquery locally if Googles CDN fails, following this thread.

Does anyone have advice for how to fall back on local jquerytools if the CDN version fails? There's a similar technique for Flowplayer discussed in Flowplayer forum, but I haven't figured out how to do it for jquerytools.

Thanks for any tips.


回答1:


You can use flashembed object from jQuery Tools, like this:

<script src="http://cdn.jquerytools.org/1.2.7/all/jquery.tools.min.js"></script>
  <script>window.flashembed || document.write('<script src="js/jquery.tools.min.js"><\/script>')</script>


来源:https://stackoverflow.com/questions/4508786/jquery-tools-fallback-if-cdn-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!