Skip to content

Instantly share code, notes, and snippets.

@martinkadlec0
Created September 12, 2013 21:17
Show Gist options
  • Select an option

  • Save martinkadlec0/6543922 to your computer and use it in GitHub Desktop.

Select an option

Save martinkadlec0/6543922 to your computer and use it in GitHub Desktop.
Marionette.Region.prototype.open = function(view) {
this.$el.replaceWith(view.el);
};
Marionette.Region.prototype.realClose = Marionette.Region.prototype.close;
Marionette.Region.prototype.close = function(view) {
if (this.currentView) {
this.currentView.$el.replaceWith(this.$el);
this.realClose(view);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment