Skip to content

Instantly share code, notes, and snippets.

@zoghal
Forked from joachimhs/gist:3529609
Created February 9, 2013 00:21
Show Gist options
  • Save zoghal/4743139 to your computer and use it in GitHub Desktop.
Save zoghal/4743139 to your computer and use it in GitHub Desktop.
init: function() {
var view = this;
var resizeHandler = function() {
view.rerender();
};
this.set('resizeHandler', resizeHandler);
$(window).bind('resize', this.get('resizeHandler'));
},
willDestroy: function() {
$(window).unbind('resize', this.get('resizeHandler'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment