Question: There are numerous posts that indicate that the z-index of a jQuery UI dialog can be set by passing a parameter `zIndex` to `.Dialog()`, including

[Last jQuery modal dialog z-index overrides initial modal z-index](https://stackoverflow.com/questions/6359223/last-jquery-modal-dialog-z-index-overrides-initial-modal-z-index)

However, that parameter is not listed in the jQuery UI API documentation

<http://api.jqueryui.com/dialog/>

If I set it anyhow, the z-index of my dialog is unaffected.

How can I set the z-index of the dialog?

Answer: 
It turns out that I was referencing a custom jQuery UI Theme built for an old version of jQuery UI. 

Referencing the base theme for the version I'm now using resolved this issue.

For upgrading a custom theme to the current version, see

[How to upgrade a custom jQuery UI theme?](https://stackoverflow.com/questions/3802447/how-to-upgrade-a-custom-jquery-ui-theme)
I think it would be preferable to do this in the CSS based on the selector, so something like:

```
#dialog {
    z-index: 100000000;
}

```

Or, in the js:

```
$('#dialog').css('z-index','1000000');

```

Or do you need to set a dynamic z-index value?