/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var obj = { a : Object, b : Array, c : false, d : null, init : function() { // set local object vars here this.run(); }, run : function() { // run bulk of behavior here } } function initializer() { obj.init(); // other init() methods go here } addEvent(window,'load',inializer);