title: remove event of keydown from selector doesn't work?
body: <p>I use keydown on one of my element, but I want to unbind it if it doesn't fit into my condition. But I used <code>off()</code> and <code>unbind</code> it doesn't seem to work. The alert of still got trigged, I wonder why.</p>
  
  <pre><code>if (imgDOM.naturalWidth &gt; imgDOM.naturalHeight) {
  
    $('#caption').attr('maxlength', 220);
  
    $("#caption").keydown(function(e) {
      if ((e.keyCode == 10 || e.keyCode == 13)) {
        e.preventDefault();
        alert('Landscape photo is allowed to have only single line of message.');
        return false;
      }
    });
  
  } else {
    $('#caption').off('keydown', function() { //this won't work
      limit_lines_for_potrait();
    })
  }
  </code></pre>