From e8b2bb81c64bad1055026bf35fbd367068308b84 Mon Sep 17 00:00:00 2001 From: Ian Stewart Date: Fri, 3 Feb 2012 14:02:28 +0000 Subject: [PATCH] _s: A better name for the image navigation script and better experience by cycling through a gallery when done git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8849 d957f892-c61d-0410-b221-f235e6eecf30 --- image.php | 2 +- js/{keyboard-navigation.js => keyboard-image-navigation.js} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename js/{keyboard-navigation.js => keyboard-image-navigation.js} (86%) diff --git a/image.php b/image.php index fdac043e..2db50fed 100644 --- a/image.php +++ b/image.php @@ -7,7 +7,7 @@ */ get_header(); -wp_enqueue_script( 'keyboard-navigation', get_template_directory_uri() . '/js/keyboard-navigation.js', array( 'jquery' ), '20120202' ); +wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' ); ?>
diff --git a/js/keyboard-navigation.js b/js/keyboard-image-navigation.js similarity index 86% rename from js/keyboard-navigation.js rename to js/keyboard-image-navigation.js index 80a22b1d..323af7fb 100644 --- a/js/keyboard-navigation.js +++ b/js/keyboard-image-navigation.js @@ -5,7 +5,7 @@ jQuery( document ).ready( function( $ ) { url = $( '.previous-image a' ).attr( 'href' ); } else if ( e.which == 39 ) { // Right arrow key code - url = $( '.next-image a' ).attr( 'href' ); + url = $( '.entry-attachment a' ).attr( 'href' ); } if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) { window.location = url;