I'm appending the jquery dialog to body. I'm setting the height to the dialog.
// Create timeout warning dialog
$('body').append('<div id="sessionTimeout-dialog" title="'
+ opts.title
+ '"><p>'
+ opts.message
+ '</p><span id="sessionTimeout-timer"></span> seconds.</div>');
$('#sessionTimeout-dialog').dialog({
autoOpen: false,
resizable: false,
minWidth: 0,
width: 300,
minHeight: 0,
height: 400,
modal: true,
closeOnEscape: false,
open: function () {
//removes the right top close(X) button from the dialog
$(".ui-dialog-titlebar-close").hide();
//$(this).dialog('option', 'maxHeight', 500);
},
buttons: {
// Logout button, closes the dialog and takes user to logout URL
"Log Out Now": function () {
$(this).dialog('close');
//window.location = 'home.php';
window.location = ''+opts.logoutUrl;
},
// Stay button, closes dialog
"Stay Connected": function () {
latestActivity = new Date();
$(this).dialog('close');
}
}
});
But it still showing the gap before the title of the dialog. Please see the attached output dialog. Need quick help on this.