How about we add a class to each generated dialog button:
ui-dialog-button-{lcase-text-of-the-button-spaces-replaced-with-hyphen}
So if you had
$("#myDiv").dialog({
buttons: {
"Ok": function() { ... },
"Cancel": function() { ... }
}
});
then you could target those buttons, whether you wanted to hide them, show them, disable them:
$(".ui-dialog-button-ok").hide();
$(".ui-dialog-button-cancel").attr("disabled", "disabled");
Currently you have to do this using the ordinal position and index of the button in the pane. Thoughts?
- Richard