Skip to content
Browse files

Added play/pause functionality for hitting the 'p' key

  • Loading branch information...
1 parent 8d89665 commit 65b1e6d8a90ab3905917e72016eb511b833c08fc @dseif committed Feb 22, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 js/introduction.js
View
7 js/introduction.js
@@ -16,6 +16,13 @@ $(function() {
}
});
+ document.addEventListener( "keydown", function( e ) {
+ if( e.keyCode === 80 ) {
+ var elem = document.getElementById( "audio" );
+ !elem.paused ? elem.pause() : elem.play();
+ }
+ }, false);
+
$('#style-themes').change(function() {
$('#style-theme-link').attr('href', $(this).val());
});

0 comments on commit 65b1e6d

Please sign in to comment.
Something went wrong with that request. Please try again.