mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Core: Fixed #3233: Added constants for key codes.
This commit is contained in:
parent
57ed1acc45
commit
e0e41d7a5b
@ -11,15 +11,44 @@
|
|||||||
|
|
||||||
/** jQuery core modifications and additions **/
|
/** 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;
|
var _remove = $.fn.remove;
|
||||||
$.fn.remove = function() {
|
$.fn.remove = function() {
|
||||||
$("*", this).add(this).triggerHandler("remove");
|
$("*", this).add(this).triggerHandler("remove");
|
||||||
return _remove.apply(this, arguments );
|
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
|
// $.widget is a factory to create jQuery plugins
|
||||||
// taking some boilerplate code out of the plugin code
|
// taking some boilerplate code out of the plugin code
|
||||||
// created by Scott González and Jörn Zaefferer
|
// created by Scott González and Jörn Zaefferer
|
||||||
|
Loading…
Reference in New Issue
Block a user