jquery dialog not opening/closing

Posted by raklos on Stack Overflow See other posts from Stack Overflow or by raklos
Published on 2011-01-17T11:48:57Z Indexed on 2011/01/17 11:53 UTC
Read the original article Hit count: 141

Filed under:
|
|

i have code like this:

The dialog does not open when i use this.

 else if (json.score == -3) {
      $("#dialog-unauthenticated").dialog('open');
     }

but does when i use this! I have it initialized with autopen false above too.

else if (json.score == -3) {
                       $("#dialog-unauthenticated").dialog({
                            resizable: false,
                            height: 140,
                            modal: true,
                            buttons: {
                                "OK": function () {
                                    $(this).dialog("close");
                                }

                            }
                        });
                    }

what is wrong? close does not work either.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery