Wijmo UI for the Web
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.

Syntax
Javascript (Usage) 
var value; // Type: 
value = jQuery.wijmo.wijdialog.options.buttons;
Javascript (Specification) 
var buttons : ;
Example
This code example shows how to use the buttons option as an Object.
buttons: {
       OK: function () {
            $(this).wijdialog("close");
          }
     }
This code example shows how to use the buttons option as an Array.
$('#dialog').wijdialog({
    autoOpen: true,
    buttons: [{
        text: "Print",
        click: function() {
              $("#dialog").jqprint();
           }
        },
		{text: "Cancel",
        click: function() {
              $(this).wijdialog("close");
           }
        }
	 ]
});
Remarks
This option can be set as an Object, or as an Array.
Browser Compatibility
7
5
5

See Also

Reference

options type
captionButtons Option

 

 


© 2013 All Rights Reserved.

Send comments on this topic.