Methods
(static) formatNumberHtml(options) → {JQuery}
Format numeric HTML content to locale specific number format
Parameters:
| Name | Type | Description |
|---|---|---|
options |
nyc.util.FormatNumberHtmlOptions | The options for formatting numbers |
Returns:
The elements that have been formatted
- Type
- JQuery
(static) formatPhone(phone) → {string}
A function format phone numbers
Parameters:
| Name | Type | Description |
|---|---|---|
phone |
string | The phone number |
Returns:
- Type
- string
(static) isIe() → {boolean}
Check if browser is IE
Returns:
- Type
- boolean
(static) isIos() → {boolean}
Check if OS is iOS
Returns:
- Type
- boolean
(static) isSafari() → {boolean}
Check if browser is Safari
Returns:
- Type
- boolean
(static) pad(val, len, chropt) → {string}
A function to pad values
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
val |
string | number | The value to pad | ||
len |
number | The length of the padded result | ||
chr |
string |
<optional> |
0 | The padding character |
Returns:
- Type
- string
(static) preventDblEventHandler(event, handler, scopeopt)
A click event handler for HTML elements that will not fire twice on certain mobile devices
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
JQuery.Event | The event object | |
handler |
function | The event handler function | |
scope |
Object |
<optional> |
The scope in which to invoke the event handler |
Type Definitions
FormatNumberHtmlOptions
Object type to hold arguments for nyc.util.formatNumberHtml
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
elements |
JQuery | string | The HTML elements to format | |
lang |
string |
<optional> |
The language code for formatting |
options |
Object |
<optional> |
The options for Number#toLocaleString {@see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString} |