The buttons
property takes an array of objects that define a text
property and a click
property containing the event handler.
var options = {
modal: true,
draggable: true,
resizable: false,
position: "center",
buttons: [{
"text": "OK",
"click": function () {
$(this).dialog("close");
}
}],
close: function () {
$(".ui-dialog").remove();
}
};
For more information checkout the documentation.
Working Example http://jsfiddle.net/unWzC/