ele
Method Summary
Public Methods | ||
public |
append(ele: *, html: *) |
|
public |
asButton(element: Object): Object makes an element clickable and executes the callback, also add keyboard support, when hitting enter on the element is same as clicking |
|
public |
byClass(name: String): Object returns the first element with class |
|
public |
byClassAll(name: String): Array returns the all elements with class |
|
public |
byId(id: String): Object shortcut for document.getElementById(id) |
|
public |
byQuery(q: String): Object shortcut for document.querySelector(id) |
|
public |
byQueryAll(q: String): Array shortcut for document.querySelectorAll(id) |
|
public |
create(n: *): * |
|
public |
forEachClass(name: *, cb: *) |
|
public |
getSelectValue(el: *): * |
|
public |
hasFocus(el: *): * |
|
public |
hide(el: *) |
|
public |
isVisible(el: *): * |
|
public |
keyClick(element: Object) can be used for making element keyboard usable and continue using inline onclick e.g. |
|
public |
show(el: *) |
|
public |
toggle(el: *) |
Public Methods
public append(ele: *, html: *) source
Params:
Name | Type | Attribute | Description |
ele | * | ||
html | * |
public asButton(element: Object): Object source
makes an element clickable and executes the callback, also add keyboard support, when hitting enter on the element is same as clicking
Params:
Name | Type | Attribute | Description |
element | Object |
Return:
Object | DOM element |
public byClass(name: String): Object source
returns the first element with class
Params:
Name | Type | Attribute | Description |
name | String |
Return:
Object | DOM element |
public byClassAll(name: String): Array source
returns the all elements with class
Params:
Name | Type | Attribute | Description |
name | String |
Return:
Array | DOM elements |
public byId(id: String): Object source
shortcut for document.getElementById(id)
Params:
Name | Type | Attribute | Description |
id | String |
Return:
Object | DOM element |
public byQuery(q: String): Object source
shortcut for document.querySelector(id)
Params:
Name | Type | Attribute | Description |
q | String |
Return:
Object | DOM element |
public byQueryAll(q: String): Array source
shortcut for document.querySelectorAll(id)
Params:
Name | Type | Attribute | Description |
q | String |
Return:
Array | DOM elements |
public forEachClass(name: *, cb: *) source
Params:
Name | Type | Attribute | Description |
name | * | ||
cb | * |
public hide(el: *) source
Params:
Name | Type | Attribute | Description |
el | * |
public keyClick(element: Object) source
can be used for making element keyboard usable and continue using inline onclick e.g. onkepress="ele.keyClick(event,this)"
Params:
Name | Type | Attribute | Description |
element | Object |
public show(el: *) source
Params:
Name | Type | Attribute | Description |
el | * |
public toggle(el: *) source
Params:
Name | Type | Attribute | Description |
el | * |