Quick one today, because I have shit to do…
If you don’t know why you should load your jQuery file from Google read about some of the advantages here.
But what if for some reason Google’s CDN is unavailable…like say you’re working on the site from a local copy and U haz no interwebs???
Write a simple script that checks for jQuery in the namespace, if it doesn’t find it, load a local copy:
That’s it. It tries to load google’s, if “jQuery” is undefined, include the local version.