Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Widget () {
- this._events = {};
- this.on = function(name, callback){
- if ( ! $.isFunction(callback) ) return this;
- if ( this._events[name] == undefined )
- this._events[name] = [];
- this._events[name].push(callback);
- }
- }
- var Widget () {
- _events: {},
- on: function(name, callback){
- if ( ! $.isFunction(callback) ) return this;
- if ( this._events[name] == undefined )
- this._events[name] = [];
- this._events[name].push(callback);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement