To add to this, the button array method is useful to know because it provides more functionality for each button, for example, adding icons and other properties for each button. It should be noted that the added square brackets around the button set turn it into an array of buttons and additional curly brackets around each button object.
$("#mydialog").dialog({ buttons: [{ text: 'Confirm', icons: { primary: "ui-icon-check" }, click: function() { //do something $(this).dialog('close'); }},{ text: 'Cancel', icons: { primary: "ui-icon-cancel" }, click: function() { $(this).dialog('close'); } }] });
jgibbs Nov 17 '16 at 19:42 2016-11-17 19:42
source share