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.
Appreciate the useful tips. For more, visit mejor abogado en Vigo .
Thanks for the great tips. Discover more at Powiększanie ust .
If you wish for to grow your knowledge only keep
visiting this website and be updated with the
hottest information posted here.
The recovery milestones chart is useful. I found more detailed plans on foot and ankle surgeon NJ .
888P
Helpful review on non-surgical fat loss. I’ll check out American Laser Med Spa for a CoolSculpting evaluation. finding licensed body sculpting specialists
You’ve managed to write down about a elaborate theme in such an out there way; thanks for sharing this wonderfully crafted, neatly-written publish—discover appropriate subjects on quick windshield replacement in Charlotte
I wish people knew how much value there is in consulting with a specialist—that’s why I recommend ### any Keyword###! auto accident lawyer in Daytona
Family dynamics play such a significant role in creating an effective plan; getting professional input is wise! orange county probate attorney
Fascinating read! The tips provided here are invaluable for local SEO. For more specialized services in San Jose, check out SEO Expert San Jose CA .
For anyone considering excavation methods in Orange County, vacuum excavation offers so many advantages! Discover more at vacuum excavation orange county .
Great post. I was checking continuously this blog and
I care for such information much.
I’m impressed! Extremely helpful info specifically the last part
I was seeking this particular info for a long
time. Thank you and best of luck.
My family likes our newly refurbished space, all thanks to the great work from integral contractors. Builders Surbiton
Great point made around maintaining accurate records since failure could lead serious repercussions later down line if not addressed properly!!!! ###naKey### cheap box truck insurance