Registered User
Registered User

Reputation: 3699

jQuery dialog options doesn't re-size dynamically

I want to resize the dialog dynamically just before I open it, but this doesn't work.

EDIT: I found the problem me editing the code in the wrong place. This works as expected:

   $("#thxboxMd").dialog("option", { height: 400 });
   $("#thxboxMd").dialog("open");

Rest:

$("#thxboxMd").dialog({
                    resizable: false,
                    height: 200,
                    width: 400,
                    autoOpen: false,
                    modal: true,
                    buttons: {
                        "close": function () {
                            $(this).dialog("close");
                        }
                    }
                });

Upvotes: 0

Views: 420

Answers (2)

j08691
j08691

Reputation: 207901

Try:

$("#thxboxMd").dialog("option", "height", 400);

jsFiddle example.

Upvotes: 1

chrisvillanueva
chrisvillanueva

Reputation: 1359

try:

$("#thxboxMd").dialog("option", height, 400);

Upvotes: 1

Related Questions