2015-02-15 17:33:06 -07:00
|
|
|
|
(function (globalScope) {
|
|
|
|
|
|
|
|
|
|
globalScope.Events = {
|
|
|
|
|
|
2015-03-05 20:22:43 -07:00
|
|
|
|
on: function (obj, eventName, selector, fn) {
|
2015-02-15 17:33:06 -07:00
|
|
|
|
|
|
|
|
|
Logger.log('event.on ' + eventName);
|
2015-03-05 20:22:43 -07:00
|
|
|
|
jQuery(obj).on(eventName, selector, fn);
|
2015-02-15 17:33:06 -07:00
|
|
|
|
},
|
|
|
|
|
|
2015-03-05 20:22:43 -07:00
|
|
|
|
off: function (obj, eventName, selector, fn) {
|
2015-02-15 17:33:06 -07:00
|
|
|
|
|
|
|
|
|
Logger.log('event.off ' + eventName);
|
2015-03-05 20:22:43 -07:00
|
|
|
|
jQuery(obj).off(eventName, selector, fn);
|
2015-02-15 17:33:06 -07:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
trigger: function (obj, eventName, params) {
|
|
|
|
|
Logger.log('event.trigger ' + eventName);
|
2015-02-16 09:47:30 -07:00
|
|
|
|
jQuery(obj).trigger(eventName, params);
|
2015-02-15 17:33:06 -07:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
})(window);
|