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.

22,429 thoughts on “jQuery CDN as A Named Module In RequireJS

  1. OMT’s mindfulness strategies minimize math stress аnd
    anxiety, enabling authentic affection to expand ɑnd inspire examination quality.

    Register tоday in OMT’ѕ standalone e-learning programs and see ʏoսr grades skyrocket tһrough
    endless access to hіgh-quality, syllabus-aligned material.

    Ԝith math integrated perfectly іnto Singapore’ѕ class settings tߋ
    benefit both teachers ɑnd trainees, devoted math tuition magnifies tһese gains bү providing tailored support for
    continual achievement.

    primary tuition іs essential fⲟr PSLE as it оffers restorative assistance fօr
    topics like entire numbеrs and measurements, guaranteeing
    no fundamental weak ⲣoints continue.

    Secondary school math tuition іs necessary fߋr О Levels as
    it enhances mastery of algebraic manipulation, ɑ core element tһat frequently appears іn exam inquiries.

    Ꮤith A Levels demanding proficiency іn vectors
    аnd intricate numbers, math tuition ⲣrovides targeted method tо taҝе care of thеѕе abstract concepts effectively.

    OMT stands ᧐ut wіtһ its proprietary math educational program, meticulously mɑde tߋ match the Singapore MOE
    syllabus Ƅy completing conceptual voids tһat common school
    lessons ϲould overlook.

    Comprehensive coverage ߋf subjects sіa, leaving no gaps in understanding fοr leading math success.

    Math tuition рrovides tօ varied learning
    styles, mɑking certain no Singapore pupil is ⅼeft beһind in the race for test
    success.

    Μy web site; math tuition primary

  2. My brother recommended I might like this blog. He was totally right.
    This post actually made my day. You can not imagine simply
    how much time I had spent for this information! Thanks!

  3. It’s really very difficult in this active life to listen news on Television, so I just use
    world wide web for that reason, and take the latest news.

  4. Hi there! I’m at work surfing around your blog from
    my new iphone 3gs! Just wanted to say I love reading through your blog and look forward to all
    your posts! Carry on the outstanding work!

  5. Hey there! This is kind of off topic but I need some advice from an established blog.
    Is it tough to set up your own blog? I’m not very techincal
    but I can figure things out pretty quick. I’m thinking about
    making my own but I’m not sure where to start. Do you have any tips or suggestions?

    Appreciate it

  6. I’m really enjoying the design and layout of your blog.
    It’s a very easy on the eyes which makes it much more enjoyable for me to come
    here and visit more often. Did you hire out a designer to create your theme?
    Exceptional work!

    My web blog … wet blue

  7. Nice post. I was checking continuously this blog and I am impressed!
    Very useful info specifically the last part :) I care for
    such info much. I was looking for this certain info for a long time.
    Thank you and best of luck.

  8. I recently tried this platform to swap my Bitcoin for Tether USD TRC-20.
    Frankly speaking, everything went perfectly fine. I was really impressed by the transaction speed.

    Before this trade, I also used Dogecoin to USDC pairs with the same service.
    All transactions completed smoothly. I love the accurate exchange calculator.
    Zero hidden costs — the final amount matched exactly.

    The interface was clean, and even a first-timer could manage the whole
    exchange without help. Another thing I noticed, the security level gave me confidence.

    They respected privacy, but still the process remained safe.

    What I didn’t like is the slight delay in support response.

    It’s not a deal-breaker, but more active support staff would make the experience even better.

    Overall though, I received my funds properly. my balance updated almost instantly.

    That’s why, I definitely recommend guys who trade digital coins to visit
    this page and see the complete write-up about fast conversions between coins.

    Anyone interested in doing fast crypto swaps, this tool is totally worth it.

    You can also trade many other top coins.
    In summary, the general result was satisfying. This platform combines great rates
    and simplicity. I plan to trade here again every time
    I convert BTC or ETH. Go for it! Learn more on their official
    blog — it might change how you trade crypto.

  9. I am extremely impressed together with your writing talents and also
    with the layout to your blog. Is this a paid topic or did you customize it your self?
    Either way keep up the excellent quality writing, it is uncommon to look a great blog like this one these days..

  10. Wow! This blog looks exactly like my old one! It’s on a totally different
    subject but it has pretty much the same layout and design. Excellent
    choice of colors!

  11. I think this is among the most significant information for me.
    And i’m glad reading your article. But want to remark on some general things,
    The web site style is perfect, the articles is
    really excellent : D. Good job, cheers

  12. Hey there! Someone in my Myspace group shared this website with
    us so I came to take a look. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers!

    Terrific blog and fantastic design and style.

  13. Your style is so unique in comparison to other people I’ve
    read stuff from. Many thanks for posting when you’ve got the opportunity,
    Guess I will just bookmark this page.