Skip to content

Instantly share code, notes, and snippets.

@matthewmorrone
Last active August 29, 2015 14:10
Show Gist options
  • Save matthewmorrone/f4a80d0276fe008c62dc to your computer and use it in GitHub Desktop.
Save matthewmorrone/f4a80d0276fe008c62dc to your computer and use it in GitHub Desktop.
Keyboard Nav for Learning Portal
if (!($ instanceof jQuery)) {
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
}
$(document).keydown(function(e) {if (e.which !== 39) {return;}; $("#lnkNext").click();});
$(document).keydown(function(e) {if (e.which !== 37) {return;}; $("#lnkPrevious").click();});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment