Sha256: 1790a3f16e08ea189e034d14cb168cb1da37c2a20d903361c7438d6dc13fbeb7
Contents?: true
Size: 496 Bytes
Versions: 2
Compression:
Stored size: 496 Bytes
Contents
/** * Twenty Fourteen keyboard support for image navigation. */ ( function( $ ) { $( document ).on( 'keydown.twentyfourteen', function( e ) { var url = false; // Left arrow key code. if ( e.which === 37 ) { url = $( '.previous-image a' ).attr( 'href' ); // Right arrow key code. } else if ( e.which === 39 ) { url = $( '.entry-attachment a' ).attr( 'href' ); } if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) { window.location = url; } } ); } )( jQuery );
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stump-cli-0.1.2 | lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js |
stump-cli-0.1.1 | lib/wp/wp-content/themes/twentyfourteen/js/keyboard-image-navigation.js |