Skip to content

Commit

Permalink
Fix keyboard navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Zimmerman committed Jul 6, 2017
1 parent edb0a52 commit 66a2fc9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions assets/scripts/keyboard-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ jQuery(document).ready(function($){
$( document ).keydown( function( e ) {
var url = false;
if ( e.which == 37 ) { // Left arrow key code
url = $( '.previous a' ).attr( 'href' );
url = $( '.nav-previous a' ).attr( 'href' );
}
else if ( e.which == 39 ) { // Right arrow key code
url = $( '.next a' ).attr( 'href' );
url = $( '.nav-next a' ).attr( 'href' );
}
if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) {
window.location = url;
Expand Down
2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"/styles/structure.css": "/styles/structure.css?id=d56d5718d697713fbcb9",
"/scripts/a11y.js": "/scripts/a11y.js?id=3faa829da7a4aa2b976a",
"/scripts/columnizer.js": "/scripts/columnizer.js?id=465e1b0d7a57022d67ab",
"/scripts/keyboard-nav.js": "/scripts/keyboard-nav.js?id=a4855900bd7bb142bd70",
"/scripts/keyboard-nav.js": "/scripts/keyboard-nav.js?id=5530f96084c639f108ac",
"/scripts/sharer.js": "/scripts/sharer.js?id=b257fe1ee31a1838f343",
"/scripts/toc.js": "/scripts/toc.js?id=41dec06e39b599e9d22d"
}
2 changes: 1 addition & 1 deletion dist/scripts/keyboard-nav.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66a2fc9

Please sign in to comment.