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

silverlight - Applying a style to ItemContainerStyle in C# -

c# - NullReferenceException in MySqlClient.NativeDriver -

php - Updating recent updates - Problem in procedure - Any other approach? -