UbuntuUI.Button

Class UbuntuUI.Button

Class defined in: 0.1/ambiance/js/buttons.js:23

A Button.

Note the Ubuntu CSS style classes: success, warning, and danger

UbuntuUI.Button ( )

0.1/ambiance/js/buttons.js:23

Example

 <button data-role="button" id="buttonID">text</button>

 Javascript access:
 var button = UI.button("buttonID");

Methods

click ( callback )

0.1/ambiance/js/buttons.js:42

Associate a function with the button's Click event

Parameters

  • callback <Function>
    • The function to execute on click

Example

   UI.button("buttonid").click(function(){
    console.log("clicked");
   });