Skip to content

Instantly share code, notes, and snippets.

@ussy
Created April 23, 2010 17:40
Show Gist options
  • Save ussy/376866 to your computer and use it in GitHub Desktop.
Save ussy/376866 to your computer and use it in GitHub Desktop.
javascript:(function(){document.addEventListener("keydown",function%20handleKey(e){var%20tag=(e.target||e.srcElement).tagName;if(/input|textarea/i.test(tag)){return;}if(e.keyCode==74){var%20next=$(document.querySelector("ul.s_shapeSheetNavi%20a.active")).parent().next().find("a");next.length==0?$(document.querySelector("ul.s_shapeSheetNavi%20li:first-child%20a")).click():next.click();}else%20if(e.keyCode==75){var%20prev=$(document.querySelector("ul.s_shapeSheetNavi%20a.active")).parent().prev().find("a");prev.length==0?$(document.querySelector("ul.s_shapeSheetNavi%20li:last-child%20a")).click():prev.click();}e.preventDefault();},false);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment