Skip to content
Browse files

Change the way plugin works to use namespaces instead of special even…

…t.data.

Some benefits:

 - Enable event delegation (closes #10, closes #11)
 - Option to unbind a specific key (closes #12)
  • Loading branch information...
1 parent fc9d6da commit 321e02b98be973d1ea09eb97ceb921411ffb3415 @millermedeiros millermedeiros committed
Showing with 9,638 additions and 315 deletions.
  1. +26 −10 README.md
  2. +9,266 −0 jquery-1.7.1.js
  3. +28 −23 jquery.hotkeys.js
  4. +240 −239 test-static-01.html
  5. +31 −19 test-static-02.html
  6. +10 −6 test-static-03.html
  7. +13 −12 test-static-04.html
  8. +24 −6 test-static-07.html
View
36 README.md
@@ -1,17 +1,17 @@
#About
-**jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination.
+**jQuery Hotkeys** is a plug-in that lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost any key combination.
This plugin is based off of the plugin by Tzury Bar Yochay: [jQuery.hotkeys](http://github.com/tzuryby/hotkeys)
The syntax is as follows:
- $(expression).bind(types, keys, handler);
- $(expression).unbind(types, handler);
-
- $(document).bind('keydown', 'ctrl+a', fn);
-
+ $(expression).bind(types.keys, handler);
+ $(expression).unbind(types.keys, handler);
+
+ $(document).bind('keydown.ctrl_a', fn);
+
// e.g. replace '$' sign with 'EUR'
- $('input.foo').bind('keyup', '$', function(){
+ $('input.foo').bind('keyup.$', function(){
this.value = this.value.replace('$', 'EUR');
});
@@ -20,10 +20,26 @@ Supported types are `'keydown'`, `'keyup'` and `'keypress'`
## Notes
-If you want to use more than one modifiers (e.g. alt+ctrl+z) you should define them by an alphabetical order e.g. alt+ctrl+shift
+If you want to use more than one modifiers (e.g. ctrl+alt+z) you should define them by an alphabetical order e.g. `alt_ctrl_z`
Hotkeys aren't tracked if you're inside of an input element (unless you explicitly bind the hotkey directly to the input). This helps to avoid conflict with normal user typing.
+All keys that have special meaning in RegExp strings (`\.+*?^$[](){}/'#`) can't
+be removed by using the namespaced event until this jQuery bug get's fixed:
+http://bugs.jquery.com/ticket/11458 the colon (`.`) will never work (even if bug
+is fixed) since it is used to separate multiple namespaces. To remove them you
+will need to remove events to the whole event type:
+
+ // won't work
+ $('#foo').unbind('keyup.$');
+ $('#foo').unbind('keyup.+');
+
+ //will work
+ $('#foo').unbind('keyup');
+ $('#foo').unbind('keyup.a');
+ $('#foo').unbind('keyup.ctrl_s');
+
+
## jQuery Compatibility
Works with jQuery 1.4.2 and newer.
@@ -38,8 +54,8 @@ It known to be working with all the major browsers on all available platforms (W
### Addendum
-Firefox is the most liberal one in the manner of letting you capture all short-cuts even those that are built-in in the browser such as `Ctrl-t` for new tab, or `Ctrl-a` for selecting all text. You can always bubble them up to the browser by returning `true` in your handler.
+Firefox is the most liberal one in the manner of letting you capture all short-cuts even those that are built-in in the browser such as `Ctrl_t` for new tab, or `Ctrl_a` for selecting all text. You can always bubble them up to the browser by returning `true` in your handler.
Others, (IE) either let you handle built-in short-cuts, but will add their functionality after your code has executed. Or (Opera/Safari) will *not* pass those events to the DOM at all.
-*So, if you bind `Ctrl-Q` or `Alt-F4` and your Safari/Opera window is closed don't be surprised.*
+*So, if you bind `Ctrl_Q` or `Alt_F4` and your Safari/Opera window is closed don't be surprised.*
View
9,266 jquery-1.7.1.js
9,266 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
51 jquery.hotkeys.js
@@ -11,44 +11,49 @@
*/
(function(jQuery){
-
+
jQuery.hotkeys = {
version: "0.8",
specialKeys: {
8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
- 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
+ 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del",
96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
- 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
- 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
+ 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/",
+ 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8",
120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 188: ",", 190: ".",
191: "/", 224: "meta"
- },
-
+ },
+
shiftNums: {
- "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
- "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
+ "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&",
+ "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<",
".": ">", "/": "?", "\\": "|"
}
};
function keyHandler( handleObj ) {
- // Only care when a possible input has been specified
- if ( typeof handleObj.data !== "string" ) {
+
+ var origHandler = handleObj.handler,
+ //use namespace as keys so it works with event delegation as well
+ //will also allow removing listeners of a specific key combination
+ //and support data objects
+ keys = (handleObj.namespace || "").toLowerCase().split(" ");
+
+ //no need to modify handler if no keys specified
+ if (!keys.length) {
return;
}
-
- var origHandler = handleObj.handler,
- keys = handleObj.data.toLowerCase().split(" ");
-
+
handleObj.handler = function( event ) {
// Don't fire in text-accepting inputs that we didn't directly bind to
+ // important to note that $.fn.prop is only available on jquery 1.6+
if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
- event.target.type === "text" || $(event.target).prop('contenteditable') == 'true' )) {
+ event.target.type === "text" || $(event.target).prop('contenteditable') == 'true' )) {
return;
}
-
+
// Keypress represents characters, not special keys
var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
character = String.fromCharCode( event.which ).toLowerCase(),
@@ -56,20 +61,20 @@
// check combinations (alt|ctrl|shift+anything)
if ( event.altKey && special !== "alt" ) {
- modif += "alt+";
+ modif += "alt_";
}
if ( event.ctrlKey && special !== "ctrl" ) {
- modif += "ctrl+";
+ modif += "ctrl_";
}
-
+
// TODO: Need to make sure this works consistently across platforms
if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
- modif += "meta+";
+ modif += "meta_";
}
if ( event.shiftKey && special !== "shift" ) {
- modif += "shift+";
+ modif += "shift_";
}
if ( special ) {
@@ -80,7 +85,7 @@
possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
- if ( modif === "shift+" ) {
+ if ( modif === "shift_" ) {
possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
}
}
@@ -97,4 +102,4 @@
jQuery.event.special[ this ] = { add: keyHandler };
});
-})( jQuery );
+})( jQuery );
View
479 test-static-01.html
@@ -6,250 +6,251 @@
.dirty{border: solid 1px #0ca2ff; color:white; background-color:#0ca2ff}
</style>
- <script src="jquery-1.3.2.min.js"></script>
+ <script src="jquery-1.7.1.js"></script>
+ <!-- <script src="jquery-1.4.2.js"></script> -->
<script src="jquery.hotkeys.js"></script>
<script>
//This page is a result of an autogenerated content made by running test.html with firefox.
function domo(){
jQuery('#platform-details').html('<code>' + navigator.userAgent + '</code>');
- jQuery(document).bind('keydown', 'esc',function (evt){jQuery('#_esc').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'tab',function (evt){jQuery('#_tab').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'space',function (evt){jQuery('#_space').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'return',function (evt){jQuery('#_return').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'backspace',function (evt){jQuery('#_backspace').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'scroll',function (evt){jQuery('#_scroll').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'capslock',function (evt){jQuery('#_capslock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'numlock',function (evt){jQuery('#_numlock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'pause',function (evt){jQuery('#_pause').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'insert',function (evt){jQuery('#_insert').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'home',function (evt){jQuery('#_home').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'del',function (evt){jQuery('#_del').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'end',function (evt){jQuery('#_end').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'pageup',function (evt){jQuery('#_pageup').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'pagedown',function (evt){jQuery('#_pagedown').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'left',function (evt){jQuery('#_left').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'up',function (evt){jQuery('#_up').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'right',function (evt){jQuery('#_right').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'down',function (evt){jQuery('#_down').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f1',function (evt){jQuery('#_f1').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f2',function (evt){jQuery('#_f2').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f3',function (evt){jQuery('#_f3').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f4',function (evt){jQuery('#_f4').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f5',function (evt){jQuery('#_f5').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f6',function (evt){jQuery('#_f6').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f7',function (evt){jQuery('#_f7').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f8',function (evt){jQuery('#_f8').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f9',function (evt){jQuery('#_f9').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f10',function (evt){jQuery('#_f10').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f11',function (evt){jQuery('#_f11').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f12',function (evt){jQuery('#_f12').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '1',function (evt){jQuery('#_1').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '2',function (evt){jQuery('#_2').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '3',function (evt){jQuery('#_3').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '4',function (evt){jQuery('#_4').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '5',function (evt){jQuery('#_5').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '6',function (evt){jQuery('#_6').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '7',function (evt){jQuery('#_7').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '8',function (evt){jQuery('#_8').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '9',function (evt){jQuery('#_9').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', '0',function (evt){jQuery('#_0').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'a',function (evt){jQuery('#_a').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'b',function (evt){jQuery('#_b').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'c',function (evt){jQuery('#_c').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'd',function (evt){jQuery('#_d').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'e',function (evt){jQuery('#_e').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'f',function (evt){jQuery('#_f').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'g',function (evt){jQuery('#_g').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'h',function (evt){jQuery('#_h').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'i',function (evt){jQuery('#_i').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'j',function (evt){jQuery('#_j').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'k',function (evt){jQuery('#_k').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'l',function (evt){jQuery('#_l').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'm',function (evt){jQuery('#_m').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'n',function (evt){jQuery('#_n').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'o',function (evt){jQuery('#_o').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'p',function (evt){jQuery('#_p').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'q',function (evt){jQuery('#_q').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'r',function (evt){jQuery('#_r').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 's',function (evt){jQuery('#_s').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 't',function (evt){jQuery('#_t').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'u',function (evt){jQuery('#_u').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'v',function (evt){jQuery('#_v').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'w',function (evt){jQuery('#_w').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'x',function (evt){jQuery('#_x').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'y',function (evt){jQuery('#_y').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'z',function (evt){jQuery('#_z').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+a',function (evt){jQuery('#_Ctrl_a').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+b',function (evt){jQuery('#_Ctrl_b').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+c',function (evt){jQuery('#_Ctrl_c').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+d',function (evt){jQuery('#_Ctrl_d').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+e',function (evt){jQuery('#_Ctrl_e').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f',function (evt){jQuery('#_Ctrl_f').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+g',function (evt){jQuery('#_Ctrl_g').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+h',function (evt){jQuery('#_Ctrl_h').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+i',function (evt){jQuery('#_Ctrl_i').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+j',function (evt){jQuery('#_Ctrl_j').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+k',function (evt){jQuery('#_Ctrl_k').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+l',function (evt){jQuery('#_Ctrl_l').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+m',function (evt){jQuery('#_Ctrl_m').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+n',function (evt){jQuery('#_Ctrl_n').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+o',function (evt){jQuery('#_Ctrl_o').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+p',function (evt){jQuery('#_Ctrl_p').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+q',function (evt){jQuery('#_Ctrl_q').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+r',function (evt){jQuery('#_Ctrl_r').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+s',function (evt){jQuery('#_Ctrl_s').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+t',function (evt){jQuery('#_Ctrl_t').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+u',function (evt){jQuery('#_Ctrl_u').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+v',function (evt){jQuery('#_Ctrl_v').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+w',function (evt){jQuery('#_Ctrl_w').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+x',function (evt){jQuery('#_Ctrl_x').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+y',function (evt){jQuery('#_Ctrl_y').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+z',function (evt){jQuery('#_Ctrl_z').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+a',function (evt){jQuery('#_Shift_a').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+b',function (evt){jQuery('#_Shift_b').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+c',function (evt){jQuery('#_Shift_c').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+d',function (evt){jQuery('#_Shift_d').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+e',function (evt){jQuery('#_Shift_e').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f',function (evt){jQuery('#_Shift_f').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+g',function (evt){jQuery('#_Shift_g').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+h',function (evt){jQuery('#_Shift_h').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+i',function (evt){jQuery('#_Shift_i').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+j',function (evt){jQuery('#_Shift_j').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+k',function (evt){jQuery('#_Shift_k').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+l',function (evt){jQuery('#_Shift_l').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+m',function (evt){jQuery('#_Shift_m').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+n',function (evt){jQuery('#_Shift_n').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+o',function (evt){jQuery('#_Shift_o').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+p',function (evt){jQuery('#_Shift_p').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+q',function (evt){jQuery('#_Shift_q').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+r',function (evt){jQuery('#_Shift_r').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+s',function (evt){jQuery('#_Shift_s').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+t',function (evt){jQuery('#_Shift_t').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+u',function (evt){jQuery('#_Shift_u').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+v',function (evt){jQuery('#_Shift_v').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+w',function (evt){jQuery('#_Shift_w').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+x',function (evt){jQuery('#_Shift_x').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+y',function (evt){jQuery('#_Shift_y').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+z',function (evt){jQuery('#_Shift_z').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+a',function (evt){jQuery('#_Alt_a').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+b',function (evt){jQuery('#_Alt_b').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+c',function (evt){jQuery('#_Alt_c').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+d',function (evt){jQuery('#_Alt_d').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+e',function (evt){jQuery('#_Alt_e').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f',function (evt){jQuery('#_Alt_f').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+g',function (evt){jQuery('#_Alt_g').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+h',function (evt){jQuery('#_Alt_h').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+i',function (evt){jQuery('#_Alt_i').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+j',function (evt){jQuery('#_Alt_j').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+k',function (evt){jQuery('#_Alt_k').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+l',function (evt){jQuery('#_Alt_l').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+m',function (evt){jQuery('#_Alt_m').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+n',function (evt){jQuery('#_Alt_n').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+o',function (evt){jQuery('#_Alt_o').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+p',function (evt){jQuery('#_Alt_p').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+q',function (evt){jQuery('#_Alt_q').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+r',function (evt){jQuery('#_Alt_r').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+s',function (evt){jQuery('#_Alt_s').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+t',function (evt){jQuery('#_Alt_t').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+u',function (evt){jQuery('#_Alt_u').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+v',function (evt){jQuery('#_Alt_v').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+w',function (evt){jQuery('#_Alt_w').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+x',function (evt){jQuery('#_Alt_x').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+y',function (evt){jQuery('#_Alt_y').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+z',function (evt){jQuery('#_Alt_z').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+esc', function (evt){jQuery('#_Ctrl_esc').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+tab', function (evt){jQuery('#_Ctrl_tab').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+space', function (evt){jQuery('#_Ctrl_space').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+return', function (evt){jQuery('#_Ctrl_return').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+backspace', function (evt){jQuery('#_Ctrl_backspace').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+scroll', function (evt){jQuery('#_Ctrl_scroll').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+capslock', function (evt){jQuery('#_Ctrl_capslock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+numlock', function (evt){jQuery('#_Ctrl_numlock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+pause', function (evt){jQuery('#_Ctrl_pause').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+insert', function (evt){jQuery('#_Ctrl_insert').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+home', function (evt){jQuery('#_Ctrl_home').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+del', function (evt){jQuery('#_Ctrl_del').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+end', function (evt){jQuery('#_Ctrl_end').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+pageup', function (evt){jQuery('#_Ctrl_pageup').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+pagedown', function (evt){jQuery('#_Ctrl_pagedown').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+left', function (evt){jQuery('#_Ctrl_left').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+up', function (evt){jQuery('#_Ctrl_up').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+right', function (evt){jQuery('#_Ctrl_right').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+down', function (evt){jQuery('#_Ctrl_down').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f1', function (evt){jQuery('#_Ctrl_f1').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f2', function (evt){jQuery('#_Ctrl_f2').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f3', function (evt){jQuery('#_Ctrl_f3').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f4', function (evt){jQuery('#_Ctrl_f4').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f5', function (evt){jQuery('#_Ctrl_f5').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f6', function (evt){jQuery('#_Ctrl_f6').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f7', function (evt){jQuery('#_Ctrl_f7').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f8', function (evt){jQuery('#_Ctrl_f8').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f9', function (evt){jQuery('#_Ctrl_f9').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f10', function (evt){jQuery('#_Ctrl_f10').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f11', function (evt){jQuery('#_Ctrl_f11').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Ctrl+f12', function (evt){jQuery('#_Ctrl_f12').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+esc', function (evt){jQuery('#_Shift_esc').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+tab', function (evt){jQuery('#_Shift_tab').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+space', function (evt){jQuery('#_Shift_space').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+return', function (evt){jQuery('#_Shift_return').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+backspace', function (evt){jQuery('#_Shift_backspace').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+scroll', function (evt){jQuery('#_Shift_scroll').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+capslock', function (evt){jQuery('#_Shift_capslock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+numlock', function (evt){jQuery('#_Shift_numlock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+pause', function (evt){jQuery('#_Shift_pause').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+insert', function (evt){jQuery('#_Shift_insert').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+home', function (evt){jQuery('#_Shift_home').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+del', function (evt){jQuery('#_Shift_del').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+end', function (evt){jQuery('#_Shift_end').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+pageup', function (evt){jQuery('#_Shift_pageup').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+pagedown', function (evt){jQuery('#_Shift_pagedown').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+left', function (evt){jQuery('#_Shift_left').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+up', function (evt){jQuery('#_Shift_up').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+right', function (evt){jQuery('#_Shift_right').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+down', function (evt){jQuery('#_Shift_down').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f1', function (evt){jQuery('#_Shift_f1').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f2', function (evt){jQuery('#_Shift_f2').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f3', function (evt){jQuery('#_Shift_f3').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f4', function (evt){jQuery('#_Shift_f4').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f5', function (evt){jQuery('#_Shift_f5').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f6', function (evt){jQuery('#_Shift_f6').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f7', function (evt){jQuery('#_Shift_f7').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f8', function (evt){jQuery('#_Shift_f8').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f9', function (evt){jQuery('#_Shift_f9').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f10', function (evt){jQuery('#_Shift_f10').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f11', function (evt){jQuery('#_Shift_f11').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Shift+f12', function (evt){jQuery('#_Shift_f12').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+esc', function (evt){jQuery('#_Alt_esc').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+tab', function (evt){jQuery('#_Alt_tab').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+space', function (evt){jQuery('#_Alt_space').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+return', function (evt){jQuery('#_Alt_return').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+backspace', function (evt){jQuery('#_Alt_backspace').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+scroll', function (evt){jQuery('#_Alt_scroll').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+capslock', function (evt){jQuery('#_Alt_capslock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+numlock', function (evt){jQuery('#_Alt_numlock').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+pause', function (evt){jQuery('#_Alt_pause').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+insert', function (evt){jQuery('#_Alt_insert').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+home', function (evt){jQuery('#_Alt_home').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+del', function (evt){jQuery('#_Alt_del').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+end', function (evt){jQuery('#_Alt_end').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+pageup', function (evt){jQuery('#_Alt_pageup').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+pagedown', function (evt){jQuery('#_Alt_pagedown').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+left', function (evt){jQuery('#_Alt_left').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+up', function (evt){jQuery('#_Alt_up').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+right', function (evt){jQuery('#_Alt_right').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+down', function (evt){jQuery('#_Alt_down').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f1', function (evt){jQuery('#_Alt_f1').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f2', function (evt){jQuery('#_Alt_f2').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f3', function (evt){jQuery('#_Alt_f3').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f4', function (evt){jQuery('#_Alt_f4').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f5', function (evt){jQuery('#_Alt_f5').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f6', function (evt){jQuery('#_Alt_f6').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f7', function (evt){jQuery('#_Alt_f7').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f8', function (evt){jQuery('#_Alt_f8').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f9', function (evt){jQuery('#_Alt_f9').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f10', function (evt){jQuery('#_Alt_f10').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f11', function (evt){jQuery('#_Alt_f11').addClass('dirty'); return false; });
- jQuery(document).bind('keydown', 'Alt+f12', function (evt){jQuery('#_Alt_f12').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.esc',function (evt){jQuery('#_esc').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.tab',function (evt){jQuery('#_tab').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.space',function (evt){jQuery('#_space').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.return',function (evt){jQuery('#_return').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.backspace',function (evt){jQuery('#_backspace').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.scroll',function (evt){jQuery('#_scroll').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.capslock',function (evt){jQuery('#_capslock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.numlock',function (evt){jQuery('#_numlock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.pause',function (evt){jQuery('#_pause').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.insert',function (evt){jQuery('#_insert').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.home',function (evt){jQuery('#_home').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.del',function (evt){jQuery('#_del').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.end',function (evt){jQuery('#_end').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.pageup',function (evt){jQuery('#_pageup').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.pagedown',function (evt){jQuery('#_pagedown').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.left',function (evt){jQuery('#_left').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.up',function (evt){jQuery('#_up').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.right',function (evt){jQuery('#_right').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.down',function (evt){jQuery('#_down').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f1',function (evt){jQuery('#_f1').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f2',function (evt){jQuery('#_f2').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f3',function (evt){jQuery('#_f3').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f4',function (evt){jQuery('#_f4').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f5',function (evt){jQuery('#_f5').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f6',function (evt){jQuery('#_f6').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f7',function (evt){jQuery('#_f7').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f8',function (evt){jQuery('#_f8').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f9',function (evt){jQuery('#_f9').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f10',function (evt){jQuery('#_f10').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f11',function (evt){jQuery('#_f11').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f12',function (evt){jQuery('#_f12').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.1',function (evt){jQuery('#_1').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.2',function (evt){jQuery('#_2').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.3',function (evt){jQuery('#_3').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.4',function (evt){jQuery('#_4').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.5',function (evt){jQuery('#_5').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.6',function (evt){jQuery('#_6').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.7',function (evt){jQuery('#_7').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.8',function (evt){jQuery('#_8').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.9',function (evt){jQuery('#_9').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.0',function (evt){jQuery('#_0').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.a',function (evt){jQuery('#_a').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.b',function (evt){jQuery('#_b').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.c',function (evt){jQuery('#_c').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.d',function (evt){jQuery('#_d').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.e',function (evt){jQuery('#_e').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.f',function (evt){jQuery('#_f').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.g',function (evt){jQuery('#_g').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.h',function (evt){jQuery('#_h').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.i',function (evt){jQuery('#_i').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.j',function (evt){jQuery('#_j').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.k',function (evt){jQuery('#_k').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.l',function (evt){jQuery('#_l').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.m',function (evt){jQuery('#_m').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.n',function (evt){jQuery('#_n').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.o',function (evt){jQuery('#_o').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.p',function (evt){jQuery('#_p').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.q',function (evt){jQuery('#_q').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.r',function (evt){jQuery('#_r').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.s',function (evt){jQuery('#_s').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.t',function (evt){jQuery('#_t').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.u',function (evt){jQuery('#_u').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.v',function (evt){jQuery('#_v').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.w',function (evt){jQuery('#_w').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.x',function (evt){jQuery('#_x').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.y',function (evt){jQuery('#_y').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.z',function (evt){jQuery('#_z').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_a',function (evt){jQuery('#_Ctrl_a').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_b',function (evt){jQuery('#_Ctrl_b').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_c',function (evt){jQuery('#_Ctrl_c').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_d',function (evt){jQuery('#_Ctrl_d').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_e',function (evt){jQuery('#_Ctrl_e').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f',function (evt){jQuery('#_Ctrl_f').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_g',function (evt){jQuery('#_Ctrl_g').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_h',function (evt){jQuery('#_Ctrl_h').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_i',function (evt){jQuery('#_Ctrl_i').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_j',function (evt){jQuery('#_Ctrl_j').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_k',function (evt){jQuery('#_Ctrl_k').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_l',function (evt){jQuery('#_Ctrl_l').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_m',function (evt){jQuery('#_Ctrl_m').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_n',function (evt){jQuery('#_Ctrl_n').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_o',function (evt){jQuery('#_Ctrl_o').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_p',function (evt){jQuery('#_Ctrl_p').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_q',function (evt){jQuery('#_Ctrl_q').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_r',function (evt){jQuery('#_Ctrl_r').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_s',function (evt){jQuery('#_Ctrl_s').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_t',function (evt){jQuery('#_Ctrl_t').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_u',function (evt){jQuery('#_Ctrl_u').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_v',function (evt){jQuery('#_Ctrl_v').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_w',function (evt){jQuery('#_Ctrl_w').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_x',function (evt){jQuery('#_Ctrl_x').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_y',function (evt){jQuery('#_Ctrl_y').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_z',function (evt){jQuery('#_Ctrl_z').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_a',function (evt){jQuery('#_Shift_a').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_b',function (evt){jQuery('#_Shift_b').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_c',function (evt){jQuery('#_Shift_c').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_d',function (evt){jQuery('#_Shift_d').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_e',function (evt){jQuery('#_Shift_e').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f',function (evt){jQuery('#_Shift_f').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_g',function (evt){jQuery('#_Shift_g').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_h',function (evt){jQuery('#_Shift_h').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_i',function (evt){jQuery('#_Shift_i').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_j',function (evt){jQuery('#_Shift_j').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_k',function (evt){jQuery('#_Shift_k').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_l',function (evt){jQuery('#_Shift_l').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_m',function (evt){jQuery('#_Shift_m').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_n',function (evt){jQuery('#_Shift_n').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_o',function (evt){jQuery('#_Shift_o').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_p',function (evt){jQuery('#_Shift_p').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_q',function (evt){jQuery('#_Shift_q').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_r',function (evt){jQuery('#_Shift_r').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_s',function (evt){jQuery('#_Shift_s').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_t',function (evt){jQuery('#_Shift_t').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_u',function (evt){jQuery('#_Shift_u').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_v',function (evt){jQuery('#_Shift_v').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_w',function (evt){jQuery('#_Shift_w').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_x',function (evt){jQuery('#_Shift_x').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_y',function (evt){jQuery('#_Shift_y').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_z',function (evt){jQuery('#_Shift_z').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_a',function (evt){jQuery('#_Alt_a').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_b',function (evt){jQuery('#_Alt_b').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_c',function (evt){jQuery('#_Alt_c').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_d',function (evt){jQuery('#_Alt_d').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_e',function (evt){jQuery('#_Alt_e').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f',function (evt){jQuery('#_Alt_f').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_g',function (evt){jQuery('#_Alt_g').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_h',function (evt){jQuery('#_Alt_h').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_i',function (evt){jQuery('#_Alt_i').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_j',function (evt){jQuery('#_Alt_j').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_k',function (evt){jQuery('#_Alt_k').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_l',function (evt){jQuery('#_Alt_l').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_m',function (evt){jQuery('#_Alt_m').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_n',function (evt){jQuery('#_Alt_n').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_o',function (evt){jQuery('#_Alt_o').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_p',function (evt){jQuery('#_Alt_p').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_q',function (evt){jQuery('#_Alt_q').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_r',function (evt){jQuery('#_Alt_r').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_s',function (evt){jQuery('#_Alt_s').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_t',function (evt){jQuery('#_Alt_t').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_u',function (evt){jQuery('#_Alt_u').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_v',function (evt){jQuery('#_Alt_v').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_w',function (evt){jQuery('#_Alt_w').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_x',function (evt){jQuery('#_Alt_x').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_y',function (evt){jQuery('#_Alt_y').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_z',function (evt){jQuery('#_Alt_z').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_esc', function (evt){jQuery('#_Ctrl_esc').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_tab', function (evt){jQuery('#_Ctrl_tab').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_space', function (evt){jQuery('#_Ctrl_space').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_return', function (evt){jQuery('#_Ctrl_return').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_backspace', function (evt){jQuery('#_Ctrl_backspace').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_scroll', function (evt){jQuery('#_Ctrl_scroll').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_capslock', function (evt){jQuery('#_Ctrl_capslock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_numlock', function (evt){jQuery('#_Ctrl_numlock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_pause', function (evt){jQuery('#_Ctrl_pause').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_insert', function (evt){jQuery('#_Ctrl_insert').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_home', function (evt){jQuery('#_Ctrl_home').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_del', function (evt){jQuery('#_Ctrl_del').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_end', function (evt){jQuery('#_Ctrl_end').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_pageup', function (evt){jQuery('#_Ctrl_pageup').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_pagedown', function (evt){jQuery('#_Ctrl_pagedown').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_left', function (evt){jQuery('#_Ctrl_left').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_up', function (evt){jQuery('#_Ctrl_up').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_right', function (evt){jQuery('#_Ctrl_right').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_down', function (evt){jQuery('#_Ctrl_down').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f1', function (evt){jQuery('#_Ctrl_f1').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f2', function (evt){jQuery('#_Ctrl_f2').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f3', function (evt){jQuery('#_Ctrl_f3').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f4', function (evt){jQuery('#_Ctrl_f4').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f5', function (evt){jQuery('#_Ctrl_f5').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f6', function (evt){jQuery('#_Ctrl_f6').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f7', function (evt){jQuery('#_Ctrl_f7').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f8', function (evt){jQuery('#_Ctrl_f8').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f9', function (evt){jQuery('#_Ctrl_f9').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f10', function (evt){jQuery('#_Ctrl_f10').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f11', function (evt){jQuery('#_Ctrl_f11').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Ctrl_f12', function (evt){jQuery('#_Ctrl_f12').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_esc', function (evt){jQuery('#_Shift_esc').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_tab', function (evt){jQuery('#_Shift_tab').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_space', function (evt){jQuery('#_Shift_space').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_return', function (evt){jQuery('#_Shift_return').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_backspace', function (evt){jQuery('#_Shift_backspace').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_scroll', function (evt){jQuery('#_Shift_scroll').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_capslock', function (evt){jQuery('#_Shift_capslock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_numlock', function (evt){jQuery('#_Shift_numlock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_pause', function (evt){jQuery('#_Shift_pause').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_insert', function (evt){jQuery('#_Shift_insert').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_home', function (evt){jQuery('#_Shift_home').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_del', function (evt){jQuery('#_Shift_del').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_end', function (evt){jQuery('#_Shift_end').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_pageup', function (evt){jQuery('#_Shift_pageup').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_pagedown', function (evt){jQuery('#_Shift_pagedown').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_left', function (evt){jQuery('#_Shift_left').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_up', function (evt){jQuery('#_Shift_up').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_right', function (evt){jQuery('#_Shift_right').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_down', function (evt){jQuery('#_Shift_down').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f1', function (evt){jQuery('#_Shift_f1').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f2', function (evt){jQuery('#_Shift_f2').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f3', function (evt){jQuery('#_Shift_f3').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f4', function (evt){jQuery('#_Shift_f4').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f5', function (evt){jQuery('#_Shift_f5').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f6', function (evt){jQuery('#_Shift_f6').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f7', function (evt){jQuery('#_Shift_f7').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f8', function (evt){jQuery('#_Shift_f8').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f9', function (evt){jQuery('#_Shift_f9').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f10', function (evt){jQuery('#_Shift_f10').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f11', function (evt){jQuery('#_Shift_f11').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Shift_f12', function (evt){jQuery('#_Shift_f12').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_esc', function (evt){jQuery('#_Alt_esc').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_tab', function (evt){jQuery('#_Alt_tab').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_space', function (evt){jQuery('#_Alt_space').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_return', function (evt){jQuery('#_Alt_return').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_backspace', function (evt){jQuery('#_Alt_backspace').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_scroll', function (evt){jQuery('#_Alt_scroll').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_capslock', function (evt){jQuery('#_Alt_capslock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_numlock', function (evt){jQuery('#_Alt_numlock').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_pause', function (evt){jQuery('#_Alt_pause').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_insert', function (evt){jQuery('#_Alt_insert').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_home', function (evt){jQuery('#_Alt_home').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_del', function (evt){jQuery('#_Alt_del').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_end', function (evt){jQuery('#_Alt_end').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_pageup', function (evt){jQuery('#_Alt_pageup').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_pagedown', function (evt){jQuery('#_Alt_pagedown').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_left', function (evt){jQuery('#_Alt_left').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_up', function (evt){jQuery('#_Alt_up').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_right', function (evt){jQuery('#_Alt_right').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_down', function (evt){jQuery('#_Alt_down').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f1', function (evt){jQuery('#_Alt_f1').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f2', function (evt){jQuery('#_Alt_f2').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f3', function (evt){jQuery('#_Alt_f3').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f4', function (evt){jQuery('#_Alt_f4').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f5', function (evt){jQuery('#_Alt_f5').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f6', function (evt){jQuery('#_Alt_f6').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f7', function (evt){jQuery('#_Alt_f7').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f8', function (evt){jQuery('#_Alt_f8').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f9', function (evt){jQuery('#_Alt_f9').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f10', function (evt){jQuery('#_Alt_f10').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f11', function (evt){jQuery('#_Alt_f11').addClass('dirty'); return false; });
+ jQuery(document).bind('keydown.Alt_f12', function (evt){jQuery('#_Alt_f12').addClass('dirty'); return false; });
}
View
50 test-static-02.html
@@ -5,7 +5,7 @@
* {font-family: mono; font-size:0.95em}
.eventNotifier{width: 100px; float: left; color:navy; border: dotted 1px navy; padding: 4px; background-color:white; margin:3px}
.dirty{border: solid 1px #0ca2ff; color:white; background-color:#0ca2ff}
-
+
</style>
</head>
<body>
@@ -42,51 +42,63 @@
</body>
<hr />
<div id="logger"></div>
- <script src="jquery-1.3.2.min.js"></script>
+ <script src="jquery-1.7.1.min.js"></script>
+ <!-- <script src="jquery-1.3.2.min.js"></script> -->
<script src="jquery.hotkeys.js"></script>
<script>
$(document).ready(function(){
- $(document).bind('keydown', 'ctrl+l', function(){$('#input_01')[0].focus();})
- .bind('keydown', 'shift+#', function(){$('#input_01')[0].value = "Shift#";})
- .bind('keyup', 'a', function(event){
+ $(document).bind('keydown.ctrl_l', function(){$('#input_01')[0].focus();})
+ .bind('keydown.shift_#', function(){$('#input_01')[0].value = "Shift#";});
+
+ $('#input_01').bind('keyup.a', function(event){
var v = $('#input_01')[0].value;
v = v.replace("a", "b");
v = $('#input_01')[0].value = v;
-
+
})
//.bind('keyup', function () { alert (arguments); })
.bind('click', function (event){
if (event.target == $('html')[0]){
alert("save the planet, don't waste energy over meaningless clicking");
- }
+ }
});
$('input.foo').bind(
- 'keydown', {combi:'ctrl+k', disableInInput: false}, function(event){
+ 'keydown.ctrl_k', function(event){
log('binding keydown/ctrl+k to <b>input</b> applied on <b>#' + event.target.id + '</b>');
event.stopPropagation();
- event.preventDefault();
+ event.preventDefault();
}
);
- $('table').bind('keydown click keyup', 'ctrl+l', clickHandler);
+
+ // shouldn't do anything since event isn't attached to element itself
+ $('table').bind('keydown.ctrl_l click keyup.ctrl_l', clickHandler);
+ // it would work if using event delegation tho.. also with jQuery 1.7+ $.fn.on()
+ $('table').delegate('input', 'keydown.ctrl_j keyup.ctrl_j', delegateHandler);
});
-
+
function clickHandler(event){
log('binding ' + event.type + ' with(ctrl+l) to <b>table</b> applied on <b>#' + event.target.id + '</b>');
event.stopPropagation();
- event.preventDefault();
+ event.preventDefault();
+ }
+
+ function delegateHandler(event){
+ log('binding ' + event.type + ' with(ctrl+j) to <b>table</b> with event delegation applied on <b>#' + event.target.id + '</b>');
+ event.stopPropagation();
+ event.preventDefault();
}
-
+
function unbindClick(){
- $('table').unbind('click', clickHandler).unbind('keyup', 'ctrl+l', clickHandler);
+ $('table').unbind('click', clickHandler).unbind('keyup.ctrl_l', clickHandler);
}
-
+
function unbindKeyup(){
- $('table').unbind('keyup', 'ctrl+l', clickHandler);
+ $('table').unbind('keyup.ctrl_l', clickHandler);
}
-
-
+
+
function log(msg){
$('#logger').html(msg);
}
</script>
-</html>
+</html>
View
16 test-static-03.html
@@ -1,28 +1,31 @@
<html>
<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style>
* {font-family: mono; font-size:0.95em}
.eventNotifier{width: 100px; float: left; color:navy; border: dotted 1px navy; padding: 4px; background-color:white; margin:3px}
.dirty{border: solid 1px #0ca2ff; color:white; background-color:#0ca2ff}
-
+ .bar {border:3px solid #ddd}
+ .foo {border:3px solid #0ca2ff}
</style>
</head>
<body>
<h3>Test #01</h3>
+ <p>type "$" inside input fields, it should replace with "€" on boxes with blue border.</p>
<table>
<tbody>
<tr>
<td><input type='text' id='input_02' class='foo'></td>
</tr>
<tr>
- <td><input type='text' id='input_03' class='foo'></td>
+ <td><input type='text' id='input_03' class='bar'></td>
</tr>
<tr>
<td><input type='text' id='input_04' class='foo'></td>
</tr>
<tr>
- <td><input type='text' id='input_05' class='foo'></td>
+ <td><input type='text' id='input_05' class='bar'></td>
</tr>
<tr>
<td><input type='text' id='input_06' class='foo'></td>
@@ -30,13 +33,14 @@
</tbody>
</table>
</body>
- <script src="jquery-1.3.2.min.js"></script>
+ <!-- <script src="jquery-1.3.2.min.js"></script> -->
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.hotkeys.js"></script>
<script>
$(document).ready(function(){
- $('input.foo').bind('keyup', '$', function(){
+ $('input.foo').bind('keyup.$', function(){
this.value = this.value.replace('$', '');
});
});
</script>
-</html>
+</html>
View
25 test-static-04.html
@@ -4,27 +4,28 @@
* {font-family: Helvetica, Verdana, Arial; font-size:0.95em}
.eventNotifier{width: 100px; float: left; color:navy; border: dotted 1px navy; padding: 4px; background-color:white; margin:3px}
.dirty{border: solid 1px #0ca2ff; color:white; background-color:#0ca2ff}
-
+
</style>
- <script src="jquery-1.3.2.min.js"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+ <!-- <script src="jquery-1.3.2.min.js"></script> -->
<script src="jquery.hotkeys.js"></script>
<script>
//This page is a result of an autogenerated content made by running test.html with firefox.
function domo(){
jQuery('#platform-details').html('<code>' + navigator.userAgent + '</code>');
- jQuery(document).bind('keydown', '/', function (evt){
- alert("Hello Slash");
- return false;
+ jQuery(document).bind('keydown./', function (evt){
+ alert("Hello Slash");
+ return false;
});
- jQuery(document).bind('keydown', 'ctrl+p', function (evt){
- alert("think green-don't print");
- return false;
+ jQuery(document).bind('keydown.ctrl_p', function (evt){
+ alert("think green-don't print");
+ return false;
});
}
-
-
+
+
jQuery(document).ready(domo);
-
+
</script>
</head>
@@ -36,5 +37,5 @@
<div id="report-area">
</div>
-
+
</body></html>
View
30 test-static-07.html
@@ -1,29 +1,47 @@
<html>
<head>
- <script src="jquery-1.3.2.min.js"></script>
+ <!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> -->
+ <!-- <script src="jquery-1.3.2.min.js"></script> -->
+ <script src="jquery-1.7.1.js"></script>
<script src="jquery.hotkeys.js"></script>
</head>
<body>
<input type="button" id="bindCtrlS" value="bind ctrl+s" />
<input type="button" id="unBindCtrlS" value="unbind ctrl+s" />
+ <hr />
+ <input type="button" id="bindCtrlH" value="bind ctrl+h" />
+ <input type="button" id="unBindCtrlH" value="unbind ctrl+h" />
<script>
function bindCtrlS(){
- jQuery(document).bind('keydown', 'ctrl+s',function (evt){
+ jQuery(document).bind('keydown.ctrl_s', function(evt){
alert("Ctrl+S");
return false;
});
}
-
+
function unBindCtrlS(){
- jQuery(document).unbind('keydown', 'ctrl+s');
+ jQuery(document).unbind('keydown.ctrl_s');
+ }
+
+ function bindCtrlH(){
+ jQuery(document).bind('keydown.ctrl_h', function(evt){
+ alert("Ctrl+H");
+ return false;
+ });
}
-
+
+ function unBindCtrlH(){
+ jQuery(document).unbind('keydown.ctrl_h');
+ }
+
$(document).ready(function(){
$('#bindCtrlS').bind('click', bindCtrlS);
$('#unBindCtrlS').bind('click', unBindCtrlS);
+ $('#bindCtrlH').bind('click', bindCtrlH);
+ $('#unBindCtrlH').bind('click', unBindCtrlH);
}
);
-
+
</script>
</body></html>

0 comments on commit 321e02b

Please sign in to comment.
Something went wrong with that request. Please try again.