Skip to content
Permalink
Browse files

Core: Fixed #3233: Added constants for key codes.

  • Loading branch information
scottgonzalez committed Aug 23, 2008
1 parent 57ed1ac commit e0e41d7a5b517de736c8f81b96474068e3994b3b
Showing with 32 additions and 3 deletions.
  1. +32 −3 ui/ui.core.js
@@ -11,15 +11,44 @@

/** jQuery core modifications and additions **/

// This adds a selector to check if data exists.
jQuery.expr[':'].data = "jQuery.data(a, m[3])";

var _remove = $.fn.remove;
$.fn.remove = function() {
$("*", this).add(this).triggerHandler("remove");
return _remove.apply(this, arguments );
};

// This adds a selector to check if data exists.
jQuery.expr[':'].data = "jQuery.data(a, m[3])";

$.keyCode = {
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
INSERT: 45,
LEFT: 37,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SHIFT: 16,
SPACE: 32,
TAB: 9,
UP: 38
};

// $.widget is a factory to create jQuery plugins
// taking some boilerplate code out of the plugin code
// created by Scott González and Jörn Zaefferer

0 comments on commit e0e41d7

Please sign in to comment.
You can’t perform that action at this time.