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.
I truly love your site.. Great colors & theme. Did you create this
web site yourself? Please reply back as I’m wanting to create
my very own website and would like to learn where you got this from or just what the theme
is named. Kudos!
Heya! I just wanted to ask if you ever have any issues with hackers?
My last blog (wordpress) was hacked and I ended up losing months of hard work due to
no data backup. Do you have any solutions to prevent hackers?
my page; zkreciul01
I every time used to study piece of writing in news papers but
now as I am a user of web thus from now I am using net for
articles or reviews, thanks to web.
These are in fact enormous ideas in on the topic of blogging.
You have touched some good points here. Any way keep up wrinting.
An excellent feature of CoolSculpting is that it is safe for most healthy and balanced grownups.
Howdy! This is my 1st comment here so I just wanted
to give a quick shout out and tell you I really enjoy reading your posts.
Can you suggest any other blogs/websites/forums that go over the same subjects?
Thanks a lot!
I’m very pleased to find this page. I want to to thank you for your time due to this fantastic
read!! I definitely appreciated every little bit
of it and I have you book marked to look at new things
in your site.
Hello! I’ve been reading your website for a while now and finally got the bravery to go ahead
and give you a shout out from Atascocita Tx!
Just wanted to tell you keep up the excellent job!
I am really pleased to read this weblog posts which consists
of plenty of useful facts, thanks for providing these data.
I absolutely love your site.. Very nice colors & theme.
Did you develop this website yourself? Please reply back as
I’m attempting to create my own website and want to know where you got this from or exactly what
the theme is named. Cheers!