jquery dialog opening and closing don't work

Posted by Sadegh on Stack Overflow See other posts from Stack Overflow or by Sadegh
Published on 2010-06-05T11:55:03Z Indexed on 2010/06/05 12:02 UTC
Read the original article Hit count: 169

Filed under:
|
|

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);});

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery