0

Is there a way to prevent jQuery UI dialog from going above or below #top div? I'm not looking for z-index solution, but rather something like offset from the top. In this case dialog should be unable to be moved to area where is #top div.

Any suggestions?

HTML:

<div id="top"></div>
<div id="dialog">My dialog</div>

JS:

$(document).ready(function() {
    jQuery("#dialog").dialog({
                            autoOpen:true,
                            modal: false,
                            resizable: true,
                            draggable: true,
                            closeOnEscape: true,
                            title: "Title",
        open: function(){
            jQuery('.ui-widget-overlay').bind('click',function(){
                jQuery('#dialog').dialog('close');
            })
        }
    });
});

JSFIDDLE: https://jsfiddle.net/9gku6qrh/

1 Answer 1

0

This might be what you're looking for - Keep a jQuery dialog in a div - you would just need put a parent container around #dialog.

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.