Here is the code I'm using
When the jQuery UI dialog is fired second time. The updated title is not shown.
Am I doing something wrong?
Here is the code I'm using
When the jQuery UI dialog is fired second time. The updated title is not shown.
Am I doing something wrong?
This is because you're opening the same dialog, for it to take effect you either need to destroy the old dialog, like this:
$("#hello").dialog('destroy').attr("title", "Helloooooooo!")
Or just set the title and button behavior without re-creating the dialog, like this for your OK button:
OK: function () {
$(this).dialog("close")
.dialog("option", {
buttons: {
OK: function () {
$(this).dialog("close");
}
},
title: "Helloooooooo!"
}).dialog("open");
}