jQuery Accessible Keys


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. //Only needed for Webkit Browsers
  2.  
  3. if ($.browser.webkit) {
  4. $(document).keypress(function(event) {
  5.  
  6. // ALT + H in case there is other text entry on the page
  7. if (event.charCode == 729) {
  8. window.location = $('a[accesskey=h]').attr('href');
  9. }
  10.  
  11. console.log(event.charCode); //Log the key code
  12. });
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.