jQuery UI now in Google’s AJAX Libraries API

Google announced recently that jQuery UI is the latest addition to their hosted AJAX Libraries API:

jQuery UI … is now hosted on our AJAX Libraries API! As usual, your users will get a performance boost when you use JQuery UI through our API, so get started by checking out the docs.

Now you can put one script tag on any page and benefit from cache, min, gzip, and google’s CDN:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.2/jquery-ui.min.js"></script>

and you’ve got all jQuery UI plugins and effects. Beauty.

9 Responses to “jQuery UI now in Google’s AJAX Libraries API”

  1. Ty Says:

    Refresh my memory, is an API key required to use the AJAX libraries. not very practical for developers who work on multiple sites, if so?

  2. Richard D. Worth Says:

    No API key needed. See http://code.google.com/apis/ajaxlibs/ for an example.

    Also, you can include the js file directly in a script tag (as I showed above), if that suits you.

  3. Brinley Ang Says:

    I like how Google allows the you to load the latest version via their google.load() release versioning wild card. Cant do that by directly including the js file though.

  4. Richard D. Worth Says:

    @Brinley Ang:

    Actually, you can do a wild card by directly including the js file. If you want the latest 1.7 release, just use

    http://ajax.googleapis.com/ajax/libs/jqueryui/1.7/jquery-ui.min.js

    instead of

    http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js

    and it will always get the latest 1.7.X release. You can even do

    http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js

    to get the latest 1.X release. The tradeoff is google will set the expires header to something like 1 hour instead of 1 year.

  5. Dave Says:

    what about the themes?
    i guess now it uses the default theme, is there any possibility to use another (like “Dark Hive”)?

    regards

  6. Elijah Manor Says:

    Will the jQuery UI theme css files get hosted on the CDN as well? Maybe the standard ones, obviously not the custom ones you can setup. That would be really nice,.

  7. Richard D. Worth Says:

    @Elijah Manor: They UI theme files are now on the CDN. See links on http://jqueryui.com/development, bottom right

  8. Evan Carroll Says:

    I think an API key is now required for even loading jQuery stuff.

  9. Richard D. Worth Says:

    An API key is needed to use the google loader. Not needed if you just use a url directly.

Leave a Reply