Methods
-
addMenuItem(label, listener, opt)
-
Adds a menu item to the menu
Parameters:
Name Type Description label
html The test html label for the menu item
listener
function The click event handler when the html element is clicked
opt
Json A plain json object, containing optional style properties for the label.
Example: { 'width':'100px','fontSize':'20px'}Returns:
- Type
- void
-
simpleHash(strVal)
-
Generates a simple hash code (number) prefixed with the string 'hash-'.
Parameters:
Name Type Description strVal
String The string value to be hashed.
Returns:
The hash code prefixed with the string 'hash-'. If input string is empty then
'hash-0' is returned.- Type
- String