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 all the time used to read paragraph in news papers but
now as I am a user of net therefore from now I am using
net for content, thanks to web.
Хотите вывести ваш сайт на первые
позиции поисковых систем
Яндекс и Google?
Мы предлагаем качественный линкбилдинг — эффективное решение для увеличения органического трафика и роста конверсий!
Почему именно мы?
- Опытная команда специалистов,
работающая исключительно белыми методами SEO-продвижения.
- Только качественные и тематические доноры ссылок, гарантирующие стабильный рост позиций.
- Подробный отчет о проделанной работе и прозрачные условия сотрудничества.
Чем полезен линкбилдинг?
- Улучшение видимости сайта в поисковых системах.
- Рост количества целевых посетителей.
- Увеличение продаж и прибыли вашей компании.
Заинтересовались? Пишите нам в личные сообщения — подробно обсудим ваши цели и предложим индивидуальное решение для успешного продвижения вашего бизнеса онлайн!
Цена договорная, начнем сотрудничество прямо сейчас вот на адрес ===>>> ЗДЕСЬ Пишите обгаварим все ньансы!!!
Wow, amazing blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your site is magnificent, let alone the content!
If some one needs expert view regarding blogging and site-building then i
propose him/her to visit this website, Keep up the nice work.
I’m really impressed with your writing skills and also with the layout on your
blog. Is this a paid theme or did you customize it yourself?
Either way keep up the nice quality writing, it is rare to see a great blog
like this one nowadays.
This blog was… how do you say it? Relevant!! Finally I’ve found
something which helped me. Thanks!
Hello, this weekend is pleasant designed for me, as this occasion i am reading this great informative piece of writing here at my home.
What’s Happening i am new to this, I stumbled upon this I
have discovered It absolutely useful and it has helped me out
loads. I’m hoping to contribute & aid other customers like its helped me.
Good job.
Thank you for the good writeup. It in fact was a amusement account it.
Look advanced to far added agreeable from you! By the way, how could we communicate?
I really like it whenever people come together and share views.
Great site, stick with it!
Hello, this weekend is pleasant in support of me, because this occasion i am reading this wonderful
educational article here at my house.
The other day, while I was at work, my sister stole
my iphone and tested to see if it can survive a twenty five
foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83
views. I know this is completely off topic
but I had to share it with someone!
Hey! Would you mind if I share your blog with my twitter group?
There’s a lot of folks that I think would really enjoy your content.
Please let me know. Cheers
my web site – Labeling Machine
What’s up to all, the contents existing at this web site are actually amazing for people experience, well, keep up the good work fellows.