Skip to content

Instantly share code, notes, and snippets.

@brainlid
Forked from joachimhs/gist:3529609
Created January 15, 2014 23:39
Show Gist options
  • Save brainlid/8446981 to your computer and use it in GitHub Desktop.
Save brainlid/8446981 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