Modal on Modal
by John Doe
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css">
<div id="dialog-modal" title="Basic modal dialog">
Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.
</div>
<div id="second-dialog-modal" title="2nd Modal :O">
Second Modal yayyay
</div>
JavaScript
$('#dialog-modal').dialog({
height: 300,
modal: true,
buttons: {
'Another Modal': function() {
$('#second-dialog-modal').dialog('open');
},
Cancel: function() {
$(this).dialog('close');
}
}
});
$('#second-dialog-modal').dialog({
autoOpen: false,
open: function() {
$(this).load("https://www.w3.org/TR/PNG/iso_8859-1.txt");
},
height: 300,
width: '80%',
buttons: {
'Close This': function() {
$(this).dialog('close');
}
}
});