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 think this is among the most vital information for me.
And i’m glad reading your article. But wanna remark
on some general things, The web site style is great, the articles is really nice
: D. Good job, cheers
I’d like to begin by stating this is by no means any kind of promotion. This is
just a raw personal story that I chose to share because someone might need it.
If you’re battling with gambling or even noticing things getting out of hand, take a moment to
read this.
I was someone who thought occasional gambling couldn’t hurt.
Initially, it felt like harmless fun—a couple of online slots—nothing serious.
Eventually, it got worse.
Without realizing, I was checking odds more than my bank balance.
Occasionally, I won, but they just made it worse. I kept chasing that high.
One weekend, I lost nearly [insert loss amount here, e.g., "$2,000"] in less than two days.
That was my kid’s school fees. And still, I went back the next day.
What’s worse is how I started hiding things—my friends.
I was completely disgusted with myself, and yet I kept doing it.
If that sounds familiar, you know what I mean.
Then I came across a particular article—and this isn’t an ad—but it shifted my perspective.
I’m not claiming it’s a magical solution, but it made me recognize the trap I was in.
The article wasn’t judgmental. It just spoke honestly in a way I’d never understood before.
It explained how gambling is a psychological and financial trap,
and how everything about it is built to make you lose.
Reading that article, I realized that I had a problem.
And more importantly, that I wanted to stop. It gave me tools that helped me take the
initial move towards quitting.
Since then, I’ve not gambled once. I’ve talked to my partner.
It’s not easy. There are days I struggle. But I’m staying strong.
If you’re reading this and nodding along, then please read that
article. {
You’re so cool! I don’t suppose I’ve truly read through something
like this before. So good to discover another person with a few
unique thoughts on this subject matter. Really.. thanks for starting this
up. This site is one thing that is required on the internet, someone
with some originality!