justSteve
justSteve

Reputation: 5524

How to set the background of jQueryUI Dialog for v1.8x

I'd like to provide a .png that renders as the background of a jQueryUI-based dialog object. This posting references the use of an 'overlay:' parameter but 'overlay' is not listed in the current documentation.

What's the current method to achieve this effect?

thx

Upvotes: 3

Views: 2545

Answers (1)

Andrew Whitaker
Andrew Whitaker

Reputation: 126052

You could use CSS to accomplish this. Just set a background-image: url(...) on the div you're making into a dialog (here's more about background-image).

Here's an example: http://jsfiddle.net/andrewwhitaker/S5pmw/

Edit: Just looking at the 1.6 code, it looks like you could specify CSS rules for the overlay that appears behind the dialog (if you specify modal). It doesn't control the actual background of the dialog itself, and it looks like this option was removed in 1.7(3). Here's a related jQuery forum thread about the option. Excerpt:

The overlay option was removed in favor of defining styles in your stylesheet. The overlay div has a class of ui-widget-overlay.

So to accomplish the behavior the overlay option gave you, you just need to define CSS rules for ui-widget-overlay.

Upvotes: 4

Related Questions