0

How can I get jQuery dialogs to show on front ? It was happening by default with previous Jquery versions.

My dialogs now appear hidden behind other stuff.

I unsuccessfully tried to set z-index this way: $("<p>My Dialog</p>").dialog().css('z-index', 9999);

ojovirtual
  • 3,332
  • 16
  • 21
Jess Stone
  • 677
  • 8
  • 21
  • Can you show your code in [fiddle](http://jsfiddle.net/) ? – Pavlo Mar 03 '14 at 12:31
  • You're setting the z-index on the original `

    ` element. jQuery UI will set up a `.ui-dialog` div which you could set the z-index for.

    – athms Mar 03 '14 at 12:33
  • Hope this could help you: http://stackoverflow.com/questions/16917430/jquery-ui-1-10-dialog-and-z-index – Pavlo Mar 03 '14 at 12:34
  • What browser are you using & which version of jQuery do you have. http://jquery.com/download/ Version 2.x does NOT support IE 6,7&8. – douwe12345 Mar 03 '14 at 12:31
  • Hello, Chrome and jQuery: both latest versions – Jess Stone Mar 03 '14 at 12:31
  • https://forum.jquery.com/topic/dialog-z-index-bug - Tells me stack:false will help.. More people have problems with that! – douwe12345 Mar 03 '14 at 12:33

1 Answers1

0

I managed to fix my weird issue adding this code:

$("<p>My Dialog</p>").dialog().parent().css('z-index', '');

I had to add .parent()

Jess Stone
  • 677
  • 8
  • 21