May 22, 2012, 11:08:14 AM
Pages: [1]   Go Down
  Send this topic  |  Print  
Share this topic on FacebookShare this topic on DiggShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter Topic: JQuery Hotkeys Tutorial  (Read 814 times)
0 Members and 1 Guest are viewing this topic.
mikethedj4
Full Member
Resident Badass
*****

Reputation: +9/-1
Offline Offline

Posts: 548


Train Insane or Remain The Same


View Profile WWW
« on: July 01, 2011, 08:24:29 PM »

JQuery Hotkeys Tutorial


Before we get started. Make sure you have JQuery downloaded, and then download JQuery Hotkeys.

Now add in the following files like so...
Code:
<html>
<head>
<title>JQuery Hotkeys</title>
<script src="jquery-1.6.1.js"></script>
<script src="jquery.hotkeys.js"></script>
</head>
<body>

</body>
</html>
Now it's super easy to make a hotkey.
For example look at my code below.
Code:
$(document).bind('keydown', 'ctrl q', function() {
alert('You found the hotkey!');
});
What this code does is, when you press CTRL Q an alertbox will popup saying "You found the hotkey!".

I told you it was easy!

* jquery-hotkeys.zip (35.23 KB - downloaded 0 times.)
Logged







Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to: