I have a bunch of html files with different file-names, that I need to add an option to use keyboard arrow keys to navigate (previous and next file).
The file-names are not dynamic.. for example: filename.html, anotherfile.html, thirdone.html etc.
So I need what's in the .js file for the navigation, and what I should link the previous, next buttons on the html file?
If you were to define two ID's on two
<a>
tags like so:You could do something like this in
navigation.js
and include it from every page:You could even use a little CSS to make the
#prev, #next { display: none; }
or play around with absolutely positioned CSS triangles.