After implementing a Dialog using JqueryUI, I noticed that inside the dialog there is a <div>
. Within this <div>
, there are three <button>
elements labeled "Delete", "Cancel", and "Ok". Interestingly, the widths of these elements are automatically determined based on the text content. I need to determine the maximum width (in pixels) among these three elements.
$(document).ready(function () {
dialog = $("#dialog-confirm").dialog({
autoOpen: false,
resizable: false,
height: 500,
width: 500,
modal: true,
buttons: {
"Delete": function () {
$(this).dialog("close");
},
"Cancel": function () {
$(this).dialog("close");
},
"Ok": function () {
var width = $("[aria-describedby='dialog-confirm'] .ui-dialog- buttonpane .ui-dialog-buttonset > button").width();
alert();
}
I could use some help in solving this issue.