Home Reference Source
public class | source

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:

NameTypeAttributeDescription
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:

NameTypeAttributeDescription
element Object

Return:

Object

DOM element

public byClass(name: String): Object source

returns the first element with class

Params:

NameTypeAttributeDescription
name String

Return:

Object

DOM element

public byClassAll(name: String): Array source

returns the all elements with class

Params:

NameTypeAttributeDescription
name String

Return:

Array

DOM elements

public byId(id: String): Object source

shortcut for document.getElementById(id)

Params:

NameTypeAttributeDescription
id String

Return:

Object

DOM element

public byQuery(q: String): Object source

shortcut for document.querySelector(id)

Params:

NameTypeAttributeDescription
q String

Return:

Object

DOM element

public byQueryAll(q: String): Array source

shortcut for document.querySelectorAll(id)

Params:

NameTypeAttributeDescription
q String

Return:

Array

DOM elements

public create(n: *): * source

Params:

NameTypeAttributeDescription
n *

Return:

*

public forEachClass(name: *, cb: *) source

Params:

NameTypeAttributeDescription
name *
cb *

public getSelectValue(el: *): * source

Params:

NameTypeAttributeDescription
el *

Return:

*

public hasFocus(el: *): * source

Params:

NameTypeAttributeDescription
el *

Return:

*

public hide(el: *) source

Params:

NameTypeAttributeDescription
el *

public isVisible(el: *): * source

Params:

NameTypeAttributeDescription
el *

Return:

*

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:

NameTypeAttributeDescription
element Object

public show(el: *) source

Params:

NameTypeAttributeDescription
el *

public toggle(el: *) source

Params:

NameTypeAttributeDescription
el *