Global

Type Definitions

BeforeShowCallback(div, inst)

Keypad before show callback. Triggered before the keypad is shown.
Parameters:
Name Type Description
div jQuery The div to be shown.
inst object The current instance settings.
Source:

CloseCallback(value, inst)

Keypad on close callback. Triggered when the keypad is closed.
Parameters:
Name Type Description
value string The full value entered so far.
inst object The current instance settings.
Source:

IsAlphabeticCallback(ch) → {boolean}

Keypad is alphabetic callback. Triggered when an alphabetic key needs to be identified.
Parameters:
Name Type Description
ch string The key to check.
Source:
Returns:
true if this key is alphabetic, false if not.
Type
boolean
Example
isAlphabetic: function(ch) {
  return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z');
}

IsNumericCallback(ch) → {boolean}

Keypad is numeric callback. Triggered when an numeric key needs to be identified.
Parameters:
Name Type Description
ch string The key to check.
Source:
Returns:
true if this key is numeric, false if not.
Type
boolean
Example
isNumeric: function(ch) {
  return (ch >= '0' && ch <= '9');
}

KeyActionCallback(inst)

Key action callback. Triggered when a key is pressed.
Parameters:
Name Type Description
inst object The current instance settings.
Source:
See:
  • addKeyDef
Example
$.keypad.addKeyDef('CLEAR', 'clear', function(inst) { plugin._clearValue(inst); });

KeypressCallback(key, value, inst)

Keypad on keypress callback. Triggered when a key on the keypad is pressed.
Parameters:
Name Type Description
key string The key just pressed.
value string The full value entered so far.
inst object The current instance settings.
Source:

ToUpperCallback(ch) → {string}

Keypad to upper callback. Triggered to convert keys to upper case.
Parameters:
Name Type Description
ch string The key to convert.
Source:
Returns:
The upper case version of this key.
Type
string
Example
toUpper: function(ch) {
  return ch.toUpperCase();
}