UbuntuUI.Toolbar

Class UbuntuUI.Toolbar

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

A Toolbar is the JavaScript representation of an Ubuntu HTML5 app footer.

Contained List provides buttons

The Toolbar contains a List, where each list item is treated as a Button (see below). List items (Buttons) are pushed to the right. The default Back button always exists to the left and does not need to be declared.

Default and custom footers

See the Pagestack class documentation for information about the default application-wide Footer, customizing it, and adding Page-specific Footers.

UbuntuUI.Toolbar ( )

0.1/ambiance/js/toolbars.js:23

Example

 <footer data-role="footer" class="revealed" id="footerID">
   <div data-role="list">
     <ul>
       <li>
         <a href="#" id="home">Home</a>
       </li>
     </ul>
   </div>
 </footer>

 JavaScript access:
 var toolbar = UI.footer("footerID");
 UI.button('home').click(function () {
   UI.pagestack.push("main");
 });

Methods

hide ( )

0.1/ambiance/js/toolbars.js:65

Hide a Toolbar


show ( )

0.1/ambiance/js/toolbars.js:58

Display a Toolbar


toggle ( )

0.1/ambiance/js/toolbars.js:72

Toggle show/hide status of a Toolbar


touch ( function )

0.1/ambiance/js/toolbars.js:79

Provide a callback function that's called with the Toolbar is touched

Parameters

  • function <Function>
    • The function that is called when the Toolbar is touched