How can I programmatically close the jQuery UI dialog after some seconds?
I suppose I need to do something inside
window.setTimeout(function() { //Something here.... }, 10000);
Try $('#idOfYourDialogue').dialog("close");
$('#idOfYourDialogue').dialog("close");
and see http://docs.jquery.com/UI/Dialog
var xSeconds = 2; // 2 seconds var myDialog = $('dialog_element').dialog('open'); setTimeout(function() { myDialog.dialog('close'); }, xSeconds * 1000);