title: jQuery delegated .off() not working
body: <p>I have the following function (stripped down for simplicity's sake):</p>
  
  <pre><code>$(document).on('click', '.js-trigger', function() {
    console.log('click enabled');
  });
  </code></pre>
  
  <p>so when i click on <code>.js-trigger</code> i get the console.log message, all fine so far. Then as soon as i resize the window, it should stop executing this function. i tried the following code:</p>
  
  <pre><code>$(window).resize(function() {
    $(document).off('click', '.js-trigger');    
  });
  </code></pre>
  
  <p>Then when i click on <code>.js-trigger</code> it should no longer output the console.log message but it still does! I have tried many different variations but the <code>off()</code> event never seems to successfully happen... What am i doing wrong?</p>
  
  <p>Interestingly, if i change it to this:</p>
  
  <pre><code>$('.js-trigger').on('click', function() {
    console.log('click enabled');
  });
  
  $(window).resize(function() {
    $('.js-trigger').off();    
  });
  </code></pre>
  
  <p>it works as expected but i need the events to be delegated cause sometimes <code>.js-trigger</code> is not present in the DOM on page load... </p>