title: jQuery: keyup and keydown event
body: <p>I'm trying to call the keydown and keyup event with JS. Howvever I get a syntax error. What's missing in the code?</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body&gt;
      &lt;div class="ryu"&gt;
          &lt;div class="ryu-still"&gt;&lt;/div&gt;
          &lt;div class="ryu-ready"&gt;&lt;/div&gt;
          &lt;div class="ryu-throwing"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="ryu-cool"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.ryu-cool {
      display: none;
      background-image: url('http://media-cdn.tripadvisor.com/media/photo-s/03/c5/42/a4/rainbow-spirit.jpg');
  } 
  
  .ryu-still {
      background-image: url('http://media-cdn.tripadvisor.com/media/photo-s/03/c5/42/a4/rainbow-  spirit.jpg');
  }
  </code></pre>
  
  <p>JS: </p>
  
  <pre><code>$(document).ready(function(){
      $('.ryu').keydown(function(e){
          if(e.keyCode == 88){
              $('.ryu-still').hide();
              $('.ryu-cool').show(); 
          })
  
      .keyup(function(e){
          if(e.keyCode == 88){
              $('.ryu-still').hide();
              $('.ryu-cool').show(); 
          });
       });
   });
  </code></pre>
  
  <p>The JSfiddle link: <a href="http://jsfiddle.net/3Ppdf/" rel="nofollow">http://jsfiddle.net/3Ppdf/</a></p>