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,196 thoughts on “jQuery CDN as A Named Module In RequireJS

  1. I am curious to find out what blog platform you happen to be
    utilizing? I’m having some small security issues with my latest blog
    and I’d like to find something more safe. Do you have any suggestions?

  2. Wonderful article! This is the type of info that
    are supposed to be shared around the internet.
    Disgrace on the seek engines for no longer positioning this post
    higher! Come on over and consult with my website . Thanks =)

  3. Thankfulness to my father who stated to me on the topic
    of this website, this website is actually awesome.

  4. When І initially commented I clicҝed the “Notify me when new comments are added” checkbox and now each time a comment is added I get four emаіⅼs ᴡith the same
    comment. Іѕ there any way yߋu can remove
    people fгom that service? Bless you!

    Also visit my wеbpɑge :: green bags

  5. Its like you read my mind! You seem to know a lot about this, like you wrote the
    book in it or something. I think that you could do
    with a few pics to drive the message home a little bit, but other than that, this is
    fantastic blog. An excellent read. I’ll definitely be back.

  6. Usually I don’t learn post on blogs, however I
    would like to say that this write-up very pressured
    me to take a look at and do so! Your writing taste has been amazed me.

    Thanks, quite nice article.

  7. Greetings! I know this is kinda off topic nevertheless I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest authoring a blog article or
    vice-versa? My website goes over a lot of the same subjects
    as yours and I feel we could greatly benefit from each other.
    If you happen to be interested feel free to send me an e-mail.
    I look forward to hearing from you! Awesome blog by the way!

  8. Thanks for the auspicious writeup. It in reality was
    once a entertainment account it. Look advanced to far delivered agreeable from you!
    However, how could we keep in touch?

  9. I am really impressed with your writing skills as well as
    with the layout on your weblog. Is this a paid theme or did you
    customize it yourself? Anyway keep up the nice quality writing, it’s rare to see a great blog like this one today.

  10. I think this is one of the such a lot vital information for
    me. And i’m happy reading your article. However should
    observation on few general issues, The web site style is ideal, the articles is really great :
    D. Excellent activity, cheers

  11. 프록시 또는 토르를 사용하거나 DNS 설정을 변경하는
    방법이 있지만, 이러한 방법으로는 완벽한 보안을 확보할 수 없으며 항상 효과가 있지는 않습니다.

  12. Woah! I’m really digging the template/theme of this blog. It’s simple, yet effective.
    A lot of times it’s very difficult to get that “perfect balance” between user friendliness
    and appearance. I must say you’ve done a awesome job with this.
    Additionally, the blog loads very fast for me on Chrome.
    Excellent Blog!

  13. Hey! I could have sworn I’ve been to this website
    before but after browsing through some of the post
    I realized it’s new to me. Anyways, I’m definitely glad I found it and I’ll be
    bookmarking and checking back frequently!

  14. In today’s fast-evolving financial landscape, it’s rare to find a
    platform that seamlessly bridges both crypto and fiat operations, especially
    for large-scale operations. However, I came across this discussion that
    dives deep into a platform which supports everything from buying Bitcoin to managing fiat payments, and
    it’s especially recommended for big businesses.
    The recommendation shared by users in the discussion made it
    clear that this platform is more than just a simple exchange
    – it’s a full-fledged financial ecosystem for
    both individuals and companies.
    Whether you’re running a startup or managing finances for a multinational corporation, the features highlighted
    in this discussion could be a game-changer – multi-user accounts, compliance tools,
    fiat gateways, and crypto custody all in one.
    This topic could be particularly useful for anyone seeking a compliant,
    scalable, and secure solution for managing both crypto and fiat
    funds. The website being discussed is built to handle everything from simple BTC purchases to large-scale B2B transactions.

    Highly suggest taking a look if you’re involved in finance,
    tech, or enterprise operations. The recommendation alone is
    worth checking out.

  15. Hello there, just became alert to your blog through Google,
    and found that it’s really informative. I’m gonna watch out
    for brussels. I will be grateful if you continue this in future.
    Many people will be benefited from your writing. Cheers!

  16. Do you have a spam problem on this blog; I also am a
    blogger, and I was wanting to know your situation;
    many of us have developed some nice methods and we are looking to exchange
    methods with other folks, be sure to shoot me an e-mail
    if interested.

  17. Great post. I used to be checking constantly this weblog and I’m impressed!
    Very useful info specially the ultimate phase :
    ) I maintain such info a lot. I was seeking this certain info for a long
    time. Thanks and good luck.

  18. Everything is very open with a really clear description of the issues.

    It was truly informative. Your website is useful.
    Thank you for sharing!

  19. Appreciating the persistence you put into your blog and
    in depth information you present. It’s great to come across a blog every once in a while that isn’t the same outdated rehashed
    material. Great read! I’ve saved your site and I’m adding
    your RSS feeds to my Google account.

  20. Hi there to all, how is everything, I think every one is getting more from this site,
    and your views are nice designed for new visitors.

  21. Heya i’m for the first time here. I came across this board and I find
    It truly useful & it helped me out much. I hope to give something back and help others like you helped me.

  22. Right here is the perfect web site for everyone who wants
    to understand this topic. You know so much its almost tough
    to argue with you (not that I really would want to…HaHa).
    You certainly put a new spin on a topic which has been discussed for
    many years. Wonderful stuff, just great!

  23. Kush Casino — это динамично развивающаяся игровая платформа. Здесь соединяются щедрые бонусы и захватывающий выбор игр. Если вы ищете сайт, где игра становится приключением, то https://kushbonus.top/ именно то, что вам нужно.

    Платформа предлагает более 3000 игр от ведущих мировых провайдеров. Для новых игроков действует щедрый стартовый пакет и кэшбэк каждую неделю.

    Моментальные депозиты и быстрые выплаты
    Адаптивный интерфейс для ПК и смартфонов
    Постоянные акции и розыгрыши

    Kush Casino — ваш новый шанс испытать удачу.

  24. In today’s fast-evolving financial landscape, it’s rare to find a platform that
    seamlessly bridges both crypto and fiat operations, especially for large-scale operations.
    However, I came across this forum topic that dives deep into a platform which supports everything from buying Bitcoin to managing fiat payments, and it’s especially recommended
    for corporate accounts.
    The opinion shared by users in the discussion made it
    clear that this platform is more than just a simple exchange
    – it’s a full-fledged financial ecosystem for both individuals and companies.

    What’s particularly valuable is the level of detail provided in the forum topic, including the pros and cons, user reviews, and case studies showing
    how enterprises have integrated the platform into their
    operations.
    I’ve rarely come across such a balanced discussion that addresses both crypto-savvy
    users and traditional finance professionals, especially in the context of business-scale needs.

    It’s a long read, but this forum topic offers some of the most detailed opinions on using crypto platforms for corporate and fiat operations alike.
    Definitely worth digging into this website.

  25. Thanks for finally talking about > jQuery CDN as A Named Module In RequireJS |
    freestyle developments < Loved it!

  26. With havin so much content do you ever run into any issues of plagorism or
    copyright infringement? My blog has a lot of unique content I’ve either created myself or outsourced but it looks
    like a lot of it is popping it up all over
    the internet without my authorization. Do you know any methods to help
    protect against content from being stolen? I’d truly appreciate it.

  27. If you’re searching for a trustworthy and powerful financial service that handles not only
    cryptocurrency transactions like buying Bitcoin but also supports a wide range of fiat operations, then you should definitely check out this topic
    where users share their opinion about a truly all-in-one crypto-financial platform.

    The recommendation shared by users in the discussion made it clear that this platform is more than just a simple
    exchange – it’s a full-fledged financial ecosystem for both individuals and companies.

    Whether you’re running a startup or managing finances for a multinational
    corporation, the features highlighted in this discussion could be a game-changer – multi-user accounts, compliance tools, fiat gateways, and crypto custody all in one.

    This topic could be particularly useful for anyone
    seeking a compliant, scalable, and secure solution for managing both crypto and fiat funds.
    The website being discussed is built to handle everything from simple
    BTC purchases to large-scale B2B transactions.
    It’s a long read, but this forum topic offers some of the most detailed opinions on using crypto platforms for corporate and fiat operations alike.
    Definitely worth digging into this website.

  28. Can I simply say what a comfort to uncover somebody that genuinely understands what they’re discussing on the internet.
    You actually understand how to bring a problem to light
    and make it important. A lot more people have to look
    at this and understand this side of the story.
    It’s surprising you are not more popular since you certainly possess the
    gift.

  29. If some one wishes to be updated with hottest technologies after that
    he must be pay a visit this web page and be up to
    date all the time.

  30. Do you have a spam problem on this website; I also am a blogger, and I
    was wanting to know your situation; many of us have developed some nice methods and
    we are looking to trade methods with other folks, be sure to shoot me an email if interested.

  31. Piece of writing writing is also a fun, if you know then you can write if not it is complex
    to write.

  32. Great blog! Do you have any recommendations for aspiring writers?

    I’m planning to start my own blog soon but I’m
    a little lost on everything. Would you propose starting with a free
    platform like WordPress or go for a paid option? There are so many
    choices out there that I’m completely confused ..
    Any recommendations? Thanks a lot!

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>