You could try it at home..perhaps
Regards,
Johannes
htmlClick = (function() {
var handles = [], handler = function() {
var args = arguments, self = this;
handles.map(function(handle) {
handle.apply(self, args);
});
};
$('html').on('click', handler);
var removeHandler = function(fn) {
handles = handles.filter(function(cb) { return cb !== fn; });
return function() { return addHandler(fn); };
};
var addHandler = function(fn) {
handles.push(fn);
return function() { return removeHandler(fn); };
};
return addHandler;
})();
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.