Using jQuery from Google CDN doesn't work I used drupal 6.22 and I enabled the jQuery Update and jQuery UI modules; I used the latest version (JQuery 1.6.4 and 1.8.16) in my libraries. When I added this code in template.php (my theme) all the page worked correctly in my web site.

drupal_add_js('sites/all/libraries/jqgrid/js/jquery.js');
drupal_add_js('sites/all/libraries/jqgrid/js/jquery-ui-custom.min.js');


When I decided to use a content delivery network (CDN) some of the pages don't work correctly. 

drupal_set_html_head('&lt;script type=text/javascript src="https://www.google.com/jsapi?key=my site"&gt;&lt;/script&gt;'); 
drupal_add_js('google.load("jquery", "1.6.4"); google.load("jqueryui", "1.8.16");'


Why is this happening?

If I use the following code, some of the pages still don't work correctly.

drupal_set_html_head('&lt;script type=text/javascript src="https://www.google.com/jsapi?key=my site"&gt;&lt;/script&gt;'); 
drupal_add_js('google.load("jquery", "1.6.4"); google.load("jqueryui", "1.8.16");
In Drupal 6, you cannot use drupal_add_js to add external JS files. You need to use drupal_set_html_head. Thankfully, in D7 this has been fixed.

drupal_set_html_head('&lt;script type="javascript" src="https://www.google.com/jsapi?key=my site"&gt;&lt;/script&gt;');
drupal_add_js('google.load("jquery", "1.6.4"); google.load("jqueryui", "1.8.16");', 'inline');