In jquery UI dialog, is it possible to put a modal dialog on top of another modal dialog

前端 未结 4 812
悲&欢浪女
悲&欢浪女 2020-12-28 19:05

I have a modal dialog using jquery UI dialog. I now want to popup another dialog when i user changes a field in the first dialog. Both should be modal.

Is this po

4条回答
  •  悲哀的现实
    2020-12-28 19:44

    As sushanth reddy indicated in the comments, set the z-index of the dialog:

    $("#secondModalDialog").dialog({
        resizable: false,
        height: 'auto',
        autoOpen: false,
        title: "Warning",
        width: 400,
        modal: true,
        zindex: 1001, // Default is 1000
        buttons: {
            'Close': function () {
                $("#secondModalDialog").dialog('close');
            }
        }
    });
    

    Reference: http://docs.jquery.com/UI/API/1.8/Dialog#option-zIndex

提交回复
热议问题