If you want RequireJS to fetch jQuery from a CDN, you’ll need to tell it to do so using the “paths” config:
require.config({
paths: {
"jquery": "https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"
}
});
As I understand it, if you want to use the local file fallback code a la html5bp you’re out of luck. For those of you who don’t know, the local file fallback code allows you to load jQuery from your own domain if the CDN version fails to load. It looks like this:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.2.min.js"><\/script>')</script>
Arguably, if you’re using jQuery it is likely to be a global requirement rather than a requirement for one or two modules. The same sort of thing with BackboneJS. It might be better to place these global requirements in the HTML for your pages (before the RequireJS script) to save typing ‘jquery’ and ‘backbone’ in all your module definitions.
Hello there! I just want to offer you a big thumbs up for your
excellent info you have right here on this post.
I will be returning to your blog for more soon.
If some one wants to be updated with most up-to-date technologies therefore he must be visit this website
and be up to date everyday.
TESLATOTO adalah situs slot online dengan RTP Live Slot tinggi yang selalu diperbaharui secara rutin. Dapatkan informasi RTP slot
terkini untuk kesempatan menang lebih tinggi! Gunakan data RTP langsung biar tahu game mana yang lagi
hot dan mudah menang!
Hi there, I found your website via Google at the same time as looking for a similar matter, your website got here up, it seems good.
I have bookmarked it in my google bookmarks.
Hi there, simply was alert to your weblog thru Google, and found that
it’s really informative. I am going to be careful
for brussels. I will be grateful in case you continue this in future.
Many other folks will be benefited from your writing. Cheers!
Its not my first time to pay a quick visit this website,
i am visiting this site dailly and obtain nice data from here all the time.