UbuntuUI.Button
A Button.
Note the Ubuntu CSS style classes: <em>positive</em>, <em>information</em>, <em>secondary</em>, and <em>negative</em>
UbuntuUI.Button
(
)
Example
<button data-role="button" id="buttonID">text</button>
Javascript access:
var button = UI.button("buttonID");
- Methods
click
( callback
)
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");
});
DOMElement element
(
)
Returns the DOM element associated with the id this widget is bind to.
Returns: <DOMElement>
Example
var mybutton = UI.button("buttonid").element();