Creating a shortcut key for the letter j to redirect to a url using jquery -


Using jQuery (if it helps), I would like to create a shortcut key for j , so when someone clicks on the letter J , it redirects to a webpage.

Is this possible?

The short answer is yes, this is possible.

Just force if you want it to be a universal shortcut

  $ (document) .keypress (function (event) {if (event.which === 106) {window.location = 'your_url';}});  

Remember to make users very clear that this will happen. There is nothing more than putting a user, who does not exist in place of triggering an order.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -