jQuery CDN as A Named Module In RequireJS

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.

2,086 thoughts on “jQuery CDN as A Named Module In RequireJS

  1. Хотите вывести ваш сайт на первые
    позиции поисковых систем
    Яндекс и Google?
    Мы предлагаем качественный линкбилдинг — эффективное решение для увеличения органического трафика и роста конверсий!

    Почему именно мы?

    - Опытная команда специалистов,
    работающая исключительно белыми методами SEO-продвижения.

    - Только качественные и тематические доноры ссылок, гарантирующие стабильный рост позиций.

    - Подробный отчет о проделанной работе и прозрачные условия сотрудничества.

    Чем полезен линкбилдинг?

    - Улучшение видимости сайта в поисковых системах.

    - Рост количества целевых посетителей.

    - Увеличение продаж и прибыли вашей компании.

    Заинтересовались? Пишите нам в личные сообщения — подробно обсудим ваши цели и предложим индивидуальное решение для успешного продвижения вашего бизнеса онлайн!

    Цена договорная, начнем сотрудничество прямо сейчас вот на адрес ===>>> ЗДЕСЬ Пишите обгаварим все ньансы!!!

  2. 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!

  3. 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.

  4. 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.

  5. This blog was… how do you say it? Relevant!! Finally I’ve found
    something which helped me. Thanks!

  6. Hello, this weekend is pleasant designed for me, as this occasion i am reading this great informative piece of writing here at my home.

  7. 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!

  8. Hi there it’s me, I am also visiting this site regularly, this site is in fact nice and
    the people are truly sharing fastidious
    thoughts.

  9. Wow, this post is pleasant, my younger sister is analyzing
    these kinds of things, thus I am going to inform her.

  10. Thanks for the marvelous posting! I definitely enjoyed reading it,
    you might be a great author.I will remember to bookmark your blog and definitely will
    come back sometime soon. I want to encourage one to continue your great job, have a nice morning!

  11. Greetings from Ohio! I’m bored to death at work so I decided to browse your website on my iphone during lunch break.

    I really like the knowledge you provide here and can’t wait to take a look when I get home.
    I’m surprised at how fast your blog loaded on my cell phone ..
    I’m not even using WIFI, just 3G .. Anyhow, fantastic blog!

  12. Excellent web site you have here.. It’s hard to
    find excellent writing like yours these days. I
    honestly appreciate people like you! Take care!!

  13. Hello, this weekend is fastidious for me, since this point in time i am reading this wonderful informative piece of
    writing here at my home.

  14. Right away I am going away to do my breakfast, later than having my breakfast coming
    again to read additional news.

  15. hey there and thank you for your info – I’ve definitely picked up something new from right here.
    I did however expertise several technical points
    using this web site, since I experienced to reload the site many times
    previous to I could get it to load properly.
    I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will sometimes affect your placement
    in google and can damage your high quality score
    if ads and marketing with Adwords. Well I’m adding this RSS to my e-mail and
    can look out for much more of your respective interesting
    content. Ensure that you update this again soon.

  16. Hello there, I discovered your website by means of Google whilst looking for a comparable matter, your site came up, it looks great.
    I’ve bookmarked it in my google bookmarks.
    Hi there, just became alert to your weblog thru Google,
    and found that it is truly informative. I’m gonna be careful for brussels.
    I’ll appreciate if you happen to proceed this in future.
    Lots of other folks can be benefited out of your writing.
    Cheers!

  17. Ꭺvoid take lightly lah, pair a reputable Junior College ρlus
    mathematics proficiency in oгder to assure high Ꭺ Levels marks plus smooth transitions.

    Mums ɑnd Dads, fear the difference hor, mathematics foundation гemains essential in Junior College to grasping figures, crucial f᧐r modern digital market.

    Temasek Junior College inspires trendsetters turough strenuous academics аnd ethical worths, blending tradition ԝith development.

    Proving ground and electives іn languages and arts promote deep knowing.
    Dynamic cߋ-curriculars construct teamwork ɑnd
    imagination. International collaborations boost international skills.
    Alumni thrive іn distinguished organizations, embodying
    excellence ɑnd service.

    Temasek Junior College inspires ɑ generation ߋf trendsetters bү merging tіme-honored traditions ԝith innovative development, offering rigorous academic
    programs instilled ᴡith ethical worths that guide students
    tⲟward meaningful аnd impactful futures.Advanced research study centers, language labs,
    ɑnd elective courses іn international languages and performing arts provide platforms fօr deep intellectual engagement, vital analysis, ɑnd imaginative expedition սnder the mentorship ߋf recognized teachers.
    Τhe vibrant ⅽo-curricular landscape, featuring competitive sports, artistic societies, ɑnd entrepreneurship
    cluƅs, cultivates teamwork, management, ɑnd
    a spirit of development that matches classroom learning.
    International collaborations, ѕuch as joint research
    study jobs wіth overseas organizations and cultural exchange programs,
    improve students’ worldwide skills, cultural sensitivity, ɑnd networking abilities.
    Alumni from Temasek Junior College thrive іn elite
    college organizations ɑnd varied professional fields, personifying tһe school’s dedication tо excellence, service-oriented management, аnd thе pursuit of
    personal and societal improvement.

    Folks, dread tһe gap hor, mathematics base remains vital аt
    Junior College fοr comprehending data, essential foг modern digital market.

    Goodness, no matter іf establishment іs fancy, math іs
    tһе deciszive topic to building poise witһ calculations.

    Hey hey, Singapore parents, math гemains likely the extremely important primary subject,
    promoting creativity tһrough issue-resolving foг groundbreaking careers.

    Οh man, no matter if establishment іs fancy,
    mathematics acts ⅼike the make-or-break subject in cultivates confidence regarding calculations.

    Kiasu parents invest іn Math resources for A-level dominance.

    Hey hey, calm pom рі pi, maths remaіns one in the highest topics іn Junior
    College, building base in А-Level calculus.

    Feel free tߋ surf to my website maths Home tuition in madurai

  18. Ahaa, its good discussion on the topic of this paragraph at
    this place at this webpage, I have read all that, so now me also commenting at this place.

  19. Особенностью сайта является его обширная база данных с информацией о рекламных интеграциях в более чем 6000 фильмах, что делает его одним из крупнейших ресурсов в этой области.

  20. Большой баннер с фотографией в рамке оказывает на вас эффект галлюцинации.

  21. Appreciating the hard work you put into your website
    and in depth information you offer. It’s good to come
    across a blog every once in a while that isn’t the same outdated rehashed material.

    Fantastic read! I’ve bookmarked your site and I’m including your RSS feeds to my Google account.

  22. 88wanwin is Cambodia’s trusted online casino. We provide exciting slot games,
    sports betting, live casino, and fishing games.

    88wanwin kh ensures safe, fun, and reliable entertainment for every
    player seeking thrilling gaming experiences.

  23. Étape 2 Saisissez ensuite l’URL de la vidéo YouTube que vous souhaitez
    convertir au format MP4 dans la nouvelle fenêtre.

  24. Размер маржи обычно находится в пределах 2-15% в зависимости от вида спорта и ранга спортивного соревнования, на которое делаются ставки.

  25. That is a really good tip particularly to those new to
    the blogosphere. Short but very precise info… Many thanks for
    sharing this one. A must read post!

  26. Attractive portion of content. I just stumbled upon your site and in accession capital
    to claim that I get in fact enjoyed account your weblog posts.
    Anyway I will be subscribing for your feeds or even I
    success you get entry to consistently quickly.

  27. Pretty section of content. I just stumbled upon your site
    and in accession capital to assert that I acquire actually enjoyed account your blog posts.

    Anyway I will be subscribing to your feeds and even I achievement you access consistently quickly.

  28. Admiring the time and energy you put into your site and detailed information you provide.
    It’s good to come across a blog every once in a while that isn’t
    the same outdated rehashed material. Fantastic read!
    I’ve saved your site and I’m including your RSS feeds
    to my Google account.

  29. Рабочая ссылка для Кракен площадки

    Кракен — трастовый marketplace в даркнете с верифицированными продавцами и удобным оформлением.

    Мы публикуем только действующие ссылки, чтобы дать безопасный и надежный подключение без перебоев.

  30. Spot on with this write-up, I honestly believe that this web
    site needs a lot more attention. I’ll probably be returning to read through more, thanks
    for the info!

  31. Добро пожаловать в Ramenbet Casino — место, где азарт и развлечения не знают границ! Здесь вас ждут уникальные игровые автоматы, карточные игры, а также выгодные бонусы для новых игроков. https://ramenbetgames-top.buzz/.

    Почему стоит выбрать Ramenbet Casino?

    Множество возможностей для выигрыша в каждом турнире и акции.
    Надежность вашего игрового процесса гарантирована.
    Богатый ассортимент развлечений от лучших провайдеров в индустрии.
    Привлекательная бонусная программа для новичков и постоянных игроков.

    Присоединяйтесь к Ramenbet Casino прямо сейчас и начните выигрывать! Вдохновляйтесь победами, наслаждайтесь игрой и получайте невероятные призы!

  32. Hi, after reading this awesome paragraph i am as well cheerful to share my knowledge here with mates.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>