Jquery Ui dialog dialog open after 10s

i have the following jquery i am trying to open a dialog after 10 seconds but i cant get it to open can soneone tell me what i am not doing right.

 $(function () {
	$("#dialog").dialog({
            modal: true,
            autoOpen: false,
	resizable: false,
            title: "jQuery Dialog",
            width: 440,
            height: 200,	
	});
	function(){
		window.setTimeout(function(){
		    $('#dialog').dialog('open')},3000);
		}
    });

This anonymous function is invalid here:

function(){
    // setTimeout code
}

You can remove that function wrapper and leave the setTimeout stuff there instead.

thanks for your reply. but i still cant get it to work.

the setTimeout says 3 seconds not 10.

then show your updated code. because it would work if you followed Paul’s advise.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.