1

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

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?

Community
  • 1
  • 1
Eric J.
  • 147,927
  • 63
  • 340
  • 553

2 Answers2

1

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?

Community
  • 1
  • 1
Eric J.
  • 147,927
  • 63
  • 340
  • 553
  • According to http://stackoverflow.com/questions/16917430/jquery-ui-1-10-dialog-and-zindex-option, the relevant change came in with jQueryUI v.1.10. – Joe Mabel Jan 24 '17 at 20:25
0

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?

David542
  • 104,438
  • 178
  • 489
  • 842