Is google.load for jquery / jquery.ui deprecated?

I just had weird execution with google.load from js.api google 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 that I can get, otherwise it gives "Error: Module:" jquery "with version" 1.8.1 "not found!" etc.

It works, however, including files in the script-tag:

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

There is no mention of google.load in the Google Hosted Libraries as an alternative, although I could have sworn it was some time ago. However, on Google Loader , this example still has jquery and jquery-ui. Did Google remember to refresh the page? And if you no longer have to download libraries with downloads, when was this change made?

+4
source share
2 answers

Right, jquery 1.8 is not in google loader

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

+1
source

Try this instead:

 google.load("jquery", "1.7.1"); 
+1
source

Source: https://habr.com/ru/post/1434500/


All Articles