Skip to content

Instantly share code, notes, and snippets.

@nagarjun
nagarjun / gist:230ab547f3a50801f2ee
Last active August 29, 2015 14:10 — forked from etozzato/gist:85da5cb66ab935d06ebf
Destroy any jQuery click handlers that have been set before transitioning to a different route.
// in the component's didInsertElement
$(window).on('resize', function() {
return Em.run.debounce(that, 'resizeWindow', 250);
});
// in the route's willTransition
actions: {
willTransition: function() {
$(window).off('resize');
}