Skip to content

Instantly share code, notes, and snippets.

@tamebadger
Created September 14, 2014 07:31
Show Gist options
  • Save tamebadger/b644489f841ab493f041 to your computer and use it in GitHub Desktop.
Save tamebadger/b644489f841ab493f041 to your computer and use it in GitHub Desktop.
Discourse Tracker
Discourse.Eyeline = function Eyeline(selector) {
this.selector = selector;
};
Discourse.Eyeline.prototype.update = function() {
//content cut
};
Discourse.Eyeline.prototype.flushRest = function() {
var self = this;
$(this.selector).each(function(i, elem) {
return self.trigger('saw', { detail: $(elem) });
});
};
RSVP.EventTarget.mixin(Discourse.Eyeline.prototype);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment