jquery - Keyboard events -


how call click event of link, when keyboard button pressed?

i call next/previous page on ctrl + / ctrl +

$(document).keydown(function(e) {   if(e.ctrlkey){      if(e.keycode == 37){         //ctrl + leftbutton pressed         $("a.prevbutton").trigger("click");      }else if(e.keycode == 39){         //ctrl + rightbutton pressed         $("a.nextbutton").trigger("click");      }   } }); 

fiddle live


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -