Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed keyboard navigation. Haven't played with or tested it yet, so…

… get it out.
  • Loading branch information...
commit 24ecb2254fdbe3fb3ae616e4ee85c97df9fa22c7 1 parent 8d3befa
@kwight authored
Showing with 1 addition and 18 deletions.
  1. +1 −4 functions.php
  2. +0 −14 js/keyboard-image-navigation.js
View
5 functions.php
@@ -131,10 +131,7 @@ function debut_scripts() {
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
-
- if ( is_singular() && wp_attachment_is_image( $post->ID ) ) {
- wp_enqueue_script( 'debut-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
- }
+
}
add_action( 'wp_enqueue_scripts', 'debut_scripts' );
View
14 js/keyboard-image-navigation.js
@@ -1,14 +0,0 @@
-jQuery( document ).ready( function( $ ) {
- $( document ).keydown( function( e ) {
- var url = false;
- if ( e.which == 37 ) { // Left arrow key code
- url = $( '.previous-image a' ).attr( 'href' );
- }
- else if ( e.which == 39 ) { // Right arrow key code
- url = $( '.entry-attachment a' ).attr( 'href' );
- }
- if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) {
- window.location = url;
- }
- } );
-} );
Please sign in to comment.
Something went wrong with that request. Please try again.