2 * Twenty Fifteen keyboard support for image navigation.
6 $( document ).on( 'keydown.twentyfifteen', function( e ) {
9 // Left arrow key code.
10 if ( e.which === 37 ) {
11 url = $( '.nav-previous a' ).attr( 'href' );
13 // Right arrow key code.
14 } else if ( e.which === 39 ) {
15 url = $( '.nav-next a' ).attr( 'href' );
18 if ( url && ( ! $( 'textarea, input' ).is( ':focus' ) ) ) {
19 window.location = url;