title: Change class value on keypress jQuery
body: <p>I would like to be able to change the css property of a specific class when pressing a certain key. In this example i would like to change the css property <code>animation-play-state</code> from <code>running</code> to <code>paused</code> when <kbd>spacebar</kbd> is pressed. The following (unsurprisingly as im rubbish at jQuery) does not work:</p>
  
  <pre><code>$(document).bind("keypress", function(e) {
     if (e.keyCode == 49) {
        $('.object').css('animation-play-state', 'paused')
     };
  });
  </code></pre>
  
  <p>can anyone guide me down the right path? Thanks!</p>