CoreFiles by mySites.guru
keyboard-image-navigation.js14 lines, 416 bytes, from wordpress-3.7-beta1.zip
Raw History Compare with 3.6-beta4
md5
dff68039b6b8cdf75ad36ff328976efd
sha1
1f5e80b6a7852a35127719747827d0ec3df4f602
sha256
7e4c7a8bf785a225ff4a11a0d38bc9ddf5c99b61f789828f04e37b5b4667b9be
jQuery( document ).ready( function( $ ) {
	$( document ).keydown( function( e ) {
		var url = false;
		if ( e.which == 37 ) {  // Left arrow key code
			url = $( '.previous-image a' ).attr( 'href' );
		}
		else if ( e.which == 39 ) {  // Right arrow key code
			url = $( '.entry-attachment a' ).attr( 'href' );
		}
		if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) {
			window.location = url;
		}
	} );
} );

The same content is in 3 releases, WordPress 3.7-beta1 to 3.7-RC1. See them all, or every version of this file.