title: jQuery cancel event on keypress escape
body: <p>From the example in my Fiddle you will see that I'm trying to once the user click on the button escape it will show the div status as cancel. </p>
  
  <p>What I did was :</p>
  
  <ol>
  <li>enter some value in the input box</li>
  <li>just click on tab to run blur event (status is changed to saved)</li>
  <li>change the value and then click on escape (the input is remove BUT the status is back to saved and not cancel)</li>
  </ol>
  
  <p>I know it runs the code under the if statement for the escape event but after that it still goes to the blur event and change the status to saved. </p>
  
  <p>See my <a href="http://jsfiddle.net/bizonbytes/SYwpy/42/" rel="nofollow">Fiddle</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input id="input"/&gt;
  &lt;div id="status"&gt;status&lt;/div&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>$(document).ready(function() {
    $('#input').live('blur', function(e){
      $('#status').html("saved");
      $('#input').live('keyup', function(e){
        if (e.keyCode == 27) { 
          $('#status').html("cancel");
          $('#input').remove();
        }    
      });  
    });                                        
  });
  </code></pre>