Skip to content
Snippets Groups Projects
Verified Commit fa4aed01 authored by Isabella Skořepová's avatar Isabella Skořepová
Browse files

Allow page switching with arrow keys

Fixes #2
parent 0993600b
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,11 @@
$(window).resize(onresize);
$(document).load(onresize);
$(document).ready(onresize);
$(document).keypress(function(e) {
if($("#search-overlay").hasClass("shown")) return;
if(e.key == "ArrowRight") window.location = "{{config.baseurl}}/{{metadata.nexturl}}";
if(e.key == "ArrowLeft") window.location = "{{config.baseurl}}/{{metadata.prevurl}}";
});
})(jQuery);
</script>
</div> <!-- #content -->
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment