the script i've pieced together so far looks like this:
<script type="text/javascript">
/* KEYNAV */
document.onkeydown = function(e) {
if (! e) var e = window.event;
var code = e.charCode ? e.charCode : e.keyCode;
if (! e.shiftKey && ! e.ctrlKey && ! e.altKey && ! e.metaKey) {
if (code == Event.KEY_LEFT) {
if ($('previous_page_link')) location.href = $('previous_page_link').href;
} else if (code == Event.KEY_RIGHT) {
if ($('next_page_link')) location.href = $('next_page_link').href;}
}
});
</script>
and my html looks like this:
<p>
{block:PreviousPage}
<a id="previous_page_link" href="{PreviousPage}">PREVIOUS PAGE</a>
{/block:PreviousPage}
{block:NextPage}
<a id="next_page_link" href="{NextPage}">NEXT PAGE</a>
{/block:NextPage}
</p>
the {PreviousPage} / {NextPage} code represents dynamic page links which are different depending on which page you are on. this particular question is specific to tumblr, but generally as well:
is there a way to get my left and right arrow keys to trigger these dynamic links?
thank you for reading and any help with this is greatly appreciated.