ITSourceCode.com

We Exist to Provide 100% Free Source Code and Tutorials

Custom Search

Hotkeys in jQuery

Hotkeys JqUERY2

This time, let’s tackle about Hotkeys jQuery plugins. Hotkeys is a plug-in that easily manipulate and catch all keys event of a keyboard. With this, you can create an event handler depending on what situation in the method. You can also create any key combinations of a keyboad that support the process you have created.

 

Let’s begin:

 

  • Create a page and name it “demo.html“.
  • Do the following codes for the design of a page.
<html>
 <head>
 <title>Hotkeys Jquery Plugins</title>
 <style type="text/css">
 input{
 width: 100px;
 height: 30px;
 font-size: 14px;
 }
 </style>
 </head>
 <body>
 <h3>Hotkeys</h3>
 <table>
 <tbody>
   <tr>
    <td><input type='text' id='input'></td>
   </tr>
 </tbody>
 </table>
 </body> 
</html>
  • Set the following jQuery Plugins.
<script src="jquery-1.4.2.js"></script>
<script src="jquery.hotkeys.js"></script>
  • Finally, create a script for the key events of a keyboard.
<script>
 $(document).ready(function(){
 /*create a keyup event handler */
 $('input').bind('keyup', 'a', function(){
 /*everytime you put letter a it automatically replace by letter b*/
 this.value = this.value.replace('a', 'b');
 });
 });
</script>

 

Another Example:

 

HOTkEYSJqUERY

 

Note: This example is available in sourcecode file.

 

For all students who need programmer for your thesis system or anyone who needs a sourcecode in any programming languages. You can contact me @ :
Email – jannopalacios@gmail.com
Mobile No. – 09305235027 – tnt

 

Download Sourcecode

Facebook Comments

Check Your Domain Ranking

Leave a Reply

Your email address will not be published. Required fields are marked *

ITSourceCode.com © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!