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
Name | Type | Default | Comments |
---|---|---|---|
themes | string[] | [] | List the IDs of the themes to include. If none are specified, all are shown.
|
themeBase | string | '' | Any common path that should prefix the location of the CSS files. |
themeFile | string | 'jquery-ui.css' | The name of the CSS file within each theme to load. Since 1.3.0. |
defaultTheme | string | '' | 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. |
icons | URL | 'img/themes.gif' | The location of the icons for the standard themes. This image is a horizontal amalgamation of all the individual icons. |
iconSize | int[2] | [23,20] | The pixel size of the individual icons in the image above. |
previews | URL | 'img/themes-preview.gif' | The location of the previews for the standard themes. This image is a horizontal amalgamation of all the individual previews. |
previewSize | int[2] | [90,80] | The pixel size of the individual previews in the image above. |
showPreviews | boolean | true | 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. |
compact | boolean | true | 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'. |
cookieExpiry | number or Date | 0 | 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. |
cookiePath | string | '/' | The path within the site to which the theme cookie applies. The default indicates the entire site. |
cookieDomain | string | '' | The domain to which the theme cookie applies. |
onSelect | function | null | 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. |