jQuery.wijmo.wijdialog Namespace > options type : buttons Field |
Default value (array): []
Default value (object): {}
The buttons option specifies the buttons to display within the dialog content area. The property key is the button text. The value is the callback function when the button is clicked. The context of the callback is the dialog element. Access to the button is available as the target of the event object.
When used as an array, each element of the array must be an Object that defines a button's properties.
Javascript (Usage) | |
---|---|
var value; // Type: value = jQuery.wijmo.wijdialog.options.buttons; |
Javascript (Specification) | |
---|---|
|
buttons: { OK: function () { $(this).wijdialog("close"); } }
$('#dialog').wijdialog({
autoOpen: true,
buttons: [{
text: "Print",
click: function() {
$("#dialog").jqprint();
}
},
{text: "Cancel",
click: function() {
$(this).wijdialog("close");
}
}
]
});