Skip to content

James Rutherford

Web, design, Newcastle, games and fun!

Archive

Tag: jQueryUI

One thing I missed out on while using Google’s hosted version of JQueryUI was that some widgets and functionality require your page to link in a theme.

I was scratching my head as to why some UI functionality seemed to be working (e.g. draggable), but other functionality was not (e.g. resizable, tabs); and linking in a theme was the answer.

It doesn’t seem to be well documented, but Google also host a number of default themes, which may be included thus:

<link rel=“stylesheet” href=“http://ajax.googleapis.com/ajax/libs/jqueryui/{version}/themes/{theme_id}/jquery-ui.css” type=“text/css” />

So, the Cupertino theme can be linked in to version 1.8.1 thus:

<link rel=“stylesheet” href=“http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/cupertino/jquery-ui.css” type=“text/css” />

More information here (NB. links use an old version of JQueryUI).

http://www.stemkoski.com/jquery-ui-1-7-2-themes-list-at-google-code/

A great optimisation for many modern websites is to farm out the hosting of linked items, such that the client browser can receive your base page code (HTML) and then pull media in from a number of directions.

Google host a number of JavaScript APIs which may be linked freely be anyone who signs up for a free Google API key.

Adding a library this way:

  • Reduces the load on your server- one less thing to push.
  • May well be quicker for the client- Google have a fast worldwide architecture, and the library may also be cached from a visit to another site.
  • Means less code for you to manage (and FTP up).

On the downside:

  • You’re reliant on an additional system- which adds an extra potential failure point to the process (this may make a page more likely to part-load than completely fail – which may or may not be advantageous).

Google currently host multiple versions of JQuery, JQueryUI,Prototype, Script.aculo.us, MooTools, Dojo, SWFObject, YUI library, Ext Core, and their own native APIs.