Skip to content

Instantly share code, notes, and snippets.

@castus
Created April 4, 2013 12:22
Show Gist options
  • Save castus/5309921 to your computer and use it in GitHub Desktop.
Save castus/5309921 to your computer and use it in GitHub Desktop.
[JS, SpineJS] Add rebind method for Spine's controller
Spine.Controller.prototype.rebind = function(element) {
var previous, _ref;
_ref = [this.el, $(element.el || element)], previous = _ref[0], this.el = _ref[1];
this.delegateEvents(this.events);
this.refreshElements();
return this.el;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment