stormist
stormist

Reputation: 5905

With jquery dialog boxes how do you apply a theme?

Example: http://jqueryui.com/demos/dialog/#modal-confirmation

The example shown allows you to view the source and even has a theme selector at the top right. But how do you apply a theme to your own code?

Upvotes: 1

Views: 2226

Answers (3)

Nick Craver
Nick Craver

Reputation: 630389

The theming framework is just a series of CSS classes that are consistently used for the most part.

To use in your own code, just apply the classes to the right elements, and they'll be themed via CSS. To get started, here's a list of those classes and what they're used for.

Upvotes: 1

Dustin Laine
Dustin Laine

Reputation: 38503

You need to include the CSS files that were part of the theme. For instance I want to theme the jQuery dialog with the ui-darkness theme:

<link type="text/css" rel="stylesheet" href="jQuery-theme-ui-darkness/jquery-ui.css" %>" />
<link type="text/css" rel="stylesheet" href="jQuery-theme-ui-darkness/ui.dialog.css" %>" />

Upvotes: 2

Cfreak
Cfreak

Reputation: 19309

Check out the "Theming" tab on that linked page. The plugin defines several classes for you. You just need to apply CSS to those classes.

Upvotes: 1

Related Questions