forked from mirror/_s
Merge pull request #303 from thomasguillot/keyboard-image-navigation
_s: Fix element for left arrow key code.
This commit is contained in:
commit
d598324b67
|
@ -2,7 +2,7 @@ jQuery( document ).ready( function( $ ) {
|
||||||
$( document ).keydown( function( e ) {
|
$( document ).keydown( function( e ) {
|
||||||
var url = false;
|
var url = false;
|
||||||
if ( e.which === 37 ) { // Left arrow key code
|
if ( e.which === 37 ) { // Left arrow key code
|
||||||
url = $( '.previous-image a' ).attr( 'href' );
|
url = $( '.nav-previous a' ).attr( 'href' );
|
||||||
}
|
}
|
||||||
else if ( e.which === 39 ) { // Right arrow key code
|
else if ( e.which === 39 ) { // Right arrow key code
|
||||||
url = $( '.entry-attachment a' ).attr( 'href' );
|
url = $( '.entry-attachment a' ).attr( 'href' );
|
||||||
|
|
Reference in New Issue