French Boy
French Boy

Reputation: 1501

How to change the title of dialog at runtime?

I wanna change the title of the JQuery UI dialog in the open event.

I tried the following:

open: function (event, ui) {
    this.title = "new name";
}

but it didn't work and the title remained the same.

Upvotes: 4

Views: 1104

Answers (1)

JMax
JMax

Reputation: 26611

you can use the option method as described here:

open: function (event, ui) {
    $(this).dialog("option","title","new name");
}

should work

Upvotes: 5

Related Questions