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.
Excellent web site. Lots of useful info here.
I am sending it to some friends ans also sharing in delicious.
And naturally, thank you to your effort!
My brother suggested I would possibly like this web site.
He was once entirely right. This publish actually made my day.
You can not imagine simply how a lot time I had spent for this info!
Thanks!
bookmarked!!, I really like your web site!
I am really grateful to the owner of this web page
who has shared this fantastic article at at this place.
You should take part in a contest for one of the highest quality
sites on the internet. I am going to highly recommend
this website!
Everyone loves it when individuals get together and share views.
Great blog, keep it up!
It’s going to be ending of mine day, except before
ending I am reading this wonderful post to improve
my experience.
We are a bunch of volunteers and starting a new scheme in our community.
Your web site offered us with useful information to work on.
You’ve performed an impressive job and our entire neighborhood
will probably be thankful to you.
Hey! Someone in my Facebook group shared this website with us so I came to give it a look.
I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers!
Terrific blog and brilliant design and style.
Valuable information. Fortunate me I discovered your site by chance, and I’m stunned why this twist of fate didn’t happened in advance!
I bookmarked it.
For the reason that the admin of this web page is working,
no uncertainty very soon it will be renowned, due to its quality contents.
https://datahk6d.site/
Hey! I know this is kinda off topic however ,
I’d figured I’d ask. Would you be interested in trading links
or maybe guest authoring a blog post or vice-versa?
My site discusses a lot of the same subjects as yours
and I feel we could greatly benefit from each other.
If you are interested feel free to shoot me
an email. I look forward to hearing from you! Wonderful blog by the way!
You can feel extreme pain or discomfort in the lower abdomen if you’re not able
to urinate for a long time. Can you read the numbers on the ruler in the
penile enlargement photo?
You might even want to go further with the treatment for more returns.