SXSW 2007 : MyTimes    Adding Code to Widgets  

You can also add functions into code. js that will run according to events.
For example:

  $widget.onLoad = function(param) {

    this.getElementByClassName("alert box").innerHTML = "Hi".

  }

There are a number of widget methods such as "getElementByClass" name that make it easy to use methods in code.js to manipulate widgets.

 
  

6 of 6
Text Author: Joe Orr   Copyright Notice Screenshot By: Joe Orr