Skip to content

Instantly share code, notes, and snippets.

@nagarjun
Forked from etozzato/gist:85da5cb66ab935d06ebf
Last active August 29, 2015 14:10

Revisions

  1. Nagarjun Palavalli revised this gist Nov 20, 2014. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -4,4 +4,8 @@ $(window).on('resize', function() {
    });

    // in the route's willTransition
    $(window).off('resize');
    actions: {
    willTransition: function() {
    $(window).off('resize');
    }
    }
  2. @etozzato etozzato created this gist Oct 13, 2014.
    7 changes: 7 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    // in the component's didInsertElement
    $(window).on('resize', function() {
    return Em.run.debounce(that, 'resizeWindow', 250);
    });

    // in the route's willTransition
    $(window).off('resize');