| 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.
| 1 2 3 4 5 6 |