jquery dialog opening and closing don't work
- by Sadegh
hi, i want to show dialog after n seconds and hide it after m seconds but it don't work for me!
$(document).ready(function () {
var advanced = $("div#advanced");
$(advanced).dialog({ autoOpen: false,
modal: true,
buttons: { "Try it now": function () { window.location = 'myURL'; },
"No thank's": function () { $(this).dialog("close"); }
},
show: 'fade',
width: 350,
height: 130,
draggable: false,
resizable: false
});
window.setTimeout(function () {
$(advanced).dialog("open");
}, n);
window.setTimeout(function () {
$(advanced).dialog("close");
}, m);});