Skip to content
Browse files

_s: A better name for the image navigation script and better experien…

…ce by cycling through a gallery when done

git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8849 d957f892-c61d-0410-b221-f235e6eecf30
  • Loading branch information...
1 parent 5f2d675 commit e8b2bb81c64bad1055026bf35fbd367068308b84 @ianstewart ianstewart committed Feb 3, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 image.php
  2. +1 −1 js/{keyboard-navigation.js → keyboard-image-navigation.js}
View
2 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' );
?>
<div id="primary" class="site-content" class="image-attachment">
View
2 js/keyboard-navigation.js → 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;

0 comments on commit e8b2bb8

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