Instance Settings

Customise each targetted div with the settings below (all are optional):

$(selector).themes({themes: ['cupertino', 'smoothness']});

compact | cookieDomain | cookieExpiry | cookiePath | defaultTheme | icons | iconSize | onSelect | previews | previewSize | showPreviews | themeBase | themeFile | themes

NameTypeDefaultComments
themesstring[][] List the IDs of the themes to include. If none are specified, all are shown.
$(selector).themes(
	{themes: ['cupertino', 'smoothness']});
themeBasestring'' Any common path that should prefix the location of the CSS files.
themeFilestring'jquery-ui.css' The name of the CSS file within each theme to load.

Since 1.3.0.
defaultThemestring'' The ID of the default theme to use when the page is first loaded. If not specified, or if it does not exist, the first theme in the defined set is used.
iconsURL'img/themes.gif' The location of the icons for the standard themes. This image is a horizontal amalgamation of all the individual icons.
iconSizeint[2][23,20] The pixel size of the individual icons in the image above.
previewsURL'img/themes-preview.gif' The location of the previews for the standard themes. This image is a horizontal amalgamation of all the individual previews.
previewSizeint[2][90,80] The pixel size of the individual previews in the image above.
showPreviewsbooleantrue Set to true to display the previews in a popup panel when hovering over the corresponding theme icon/text. When false, no previews are shown.
compactbooleantrue Set to true to display the themes in a compact format using only the icons. When false, the icon and display name are shown in separate 'buttons'.
cookieExpirynumber or Date0 The expiry date for the cookie that stores the user's theme selection. If a number, this is the number of days from today. Use the default of 0 if the cookie expires at the end of the user's session.
cookiePathstring'/' The path within the site to which the theme cookie applies. The default indicates the entire site.
cookieDomainstring'' The domain to which the theme cookie applies.
onSelectfunctionnull A callback function that is triggered when a theme is selected. The theme ID, display name, and URL are passed as parameters. Within the function this refers to the window.
Functions

addTheme | destroy | getThemes | init | option (get) | option (set) | setDefaults

SignatureReturnsComments
$.themes.setDefaults(settings)Themes object Update the default instance settings to use with all theme instances.
$.themes.addTheme(id, display, icon, preview, url)Themes object Add a definition for a new theme (or overwrite an existing one). The parameters are: id (string) the identifier for this theme, display (string) the display text for this theme, icon (URL) the location of an icon for this theme (with dimensions iconSize) or (int) the index into the icons image (starting at zero), preview (URL) the location of a preview for this theme (with dimensions previewSize) or (int) the index into the previews image (starting at zero), url (URL) the URL of the CSS for this theme.
$.theme.addTheme('bright', 'Bright Eyes', 'img/bright.png',
	'img/bright-big.png', 'bright/');
$.themes.getThemes()object[] Return details about all the known themes. The array is indexed by the theme ID (string). Each object in the array has the following attributes: display, icon, preview, url as described in addTheme.
$.each($.themes.getThemes(), function(id, theme) {
	// Process each theme here
});
$(selector).themes('option', options)jQuery object Update the settings for the themes instance(s) attached to the given div(s).

options (object) the collection of new settings.

$(selector).themes('option', {compact: false, cookieExpiry: 30});

Since 1.3.0 - previously you used the 'change' command.
$(selector).themes('option', name, value)jQuery object Update a particular setting for the themes instance(s) attached to the given div(s).

name (string) the name of the setting to change;
value (any) the new value of that setting.

$(selector).themes('option', 'compact', false);

Since 1.3.0.
$(selector).themes('option', name)object or any Retrieve one or all of the current settings for the first themes instance attached to the given div(s).

name (string, optional) the name of the setting to retrieve; omit for all settings.

var settings = $(selector).themes('option');
var compact = $(selector).themes('option', 'compact');

Since 1.3.0.
$(selector).themes('destroy')jQuery object Remove the themes functionality from the given div(s).