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.
Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your
weblog? My blog is in the exact same niche as yours and
my visitors would definitely benefit from some of the information you provide here.
Please let me know if this alright with you. Many thanks!
Why viewers still make use of to read news papers when in this technological globe everything is presented on web?
Greetings from Florida! I’m bored at work so I decided to browse your website on my iphone during lunch break.
I really like the knowledge you present here and can’t wait to
take a look when I get home. I’m surprised at how fast your blog loaded on my mobile ..
I’m not even using WIFI, just 3G .. Anyways, superb blog!
Quality articles is the main to interest
the viewers to visit the web site, that’s what this site is providing.
I all the time used to study post in news papers but now as I am a user of internet
therefore from now I am using net for articles or reviews, thanks to web.
Definitely imagine that which you said. Your favorite justification appeared to be at
the net the easiest thing to keep in mind of. I say to you,
I definitely get irked whilst other people consider issues that they plainly don’t realize about.
You managed to hit the nail upon the highest and defined out the whole thing without having side-effects , other people
could take a signal. Will probably be again to
get more. Thank you
Amazing! Its really awesome piece of writing, I have got much clear
idea concerning from this post.
Yes! Finally someone writes about kid porn.
Admiring the persistence you put into your site and
detailed information you offer. It’s nice to come across a blog every once in a
while that isn’t the same old rehashed material. Wonderful read!
I’ve saved your site and I’m including your RSS feeds to my Google account.