API Docs for: HTML-14.04-dev~bzr202

Class UbuntuUI.Shape

Class defined in: shape.js:23

An Ubuntu Shape contains and decorates (with CSS styles) some markup, often an <em>img</em>.

UbuntuUI.Shape( )
shape.js:23
Example
 <div data-role="shape" id="shapeID">
       <img src="URI"/>
     </div>
    
     JavaScript access:
     var shape = UI.shape("shapeID");
    
click( - )
shape.js:42

Associate a function with the Click event

Parameters:
  • - <Function>

    The function to execute on click

Example
   UI.shape("id").click(function(){
                    console.log("Clicked");
                   });
element( )
shape.js:59

Returns the DOM element associated with the id this widget is bind to.

Example
   var myshape = UI.shape("shapeid").element();