Best way to use Google's hosted jQuery, but fall back to my hosted library on Google fail

前端 未结 23 1390
太阳男子
太阳男子 2020-11-21 07:19

What would be a good way to attempt to load the hosted jQuery at Google (or other Google hosted libs), but load my copy of jQuery if the Google attempt fails?

I\'m n

23条回答
  •  你的背包
    2020-11-21 07:57

    • Step 1: Did jQuery fail to load? (check jQuery variable)

    How to check a not-defined variable in JavaScript

    • Step 2: Dynamically import (the backup) javascript file

    How do I include a JavaScript file in another JavaScript file?

提交回复
热议问题