How can I programmatically close a jQuery UI dialog after some number of seconds?
I figure I need to do something inside
window.setTimeout(function() {
//Something here....
}, 10000);
How can I programmatically close a jQuery UI dialog after some number of seconds?
I figure I need to do something inside
window.setTimeout(function() {
//Something here....
}, 10000);
Try $('#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.close(); }, Xseconds * 1000);