4
votes

I just had a strange run-in with google.load from the Google js.api, and loading jquery and jquery-ui.

When I use google.load

google.load('jquery', '1.7.1');
google.load('jqueryui', '1.8.17')

these versions are the highest I can get, otherwise it throws an "Error: Module: 'jquery' with version '1.8.1' not found!" and similar.

It works however with including the files in a script-tag:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.js"></script>

On Google Hosted Libraries there is no mentioning of google.load as an alternative, though I could swear there was one some time ago. However, on Google Loader, the example still has jquery and jquery-ui in it. Did Google forget to update the page? And if you are not supposed to load libs with load anymore, when was this change introduced?

2
There is no jquery 1.8.2 released. The latest major one is 1.8.1 - zerkms
Sorry, my mistake, I meant 1.8.1. However, the problem still occurs. - Narretz

2 Answers

1
votes

Correct, jquery 1.8 is not in the Google Loader

If you go directly to https://www.google.com/jsapi you will see at the bottom all of the supported versions and that 1.8.1 does not exist.

1
votes

Try this instead:

google.load("jquery", "1.7.1");