Class: Element

Element

new Element()

Source:

Classes

Basic
WithContent

Methods

attr()

Prefer use of Element#getAttribute and Element#setAttribute

.attr(values)
.attr(name, value)
.attr(name)
Source:

empty()

Remove the children's element
Source:

getAttribute(attributeName) → {string}

Get the value of an attribute
Parameters:
Name Type Description
attributeName string
Source:
Returns:
Type
string

getValue() → {string}

Get value
Source:
Returns:
Type
string

hide()

Hide the element (add the class .hidden)
Source:

prop()

Prefer use of Element#getProperty and {@link Element#setProperty}

.prop(properties)
.prop(name, value)
.prop(name)
Source:

remove()

Remove the element from the DOM
Source:

setValue(_class) → {Element}

Set value
Parameters:
Name Type Description
_class string
Source:
Returns:
Type
Element

show()

Show the element (remove the class .hidden)
Source:

stop()

Stop any animations for the element
Source:

style()

Prefer use of Element#getStyle and {@link Element#setStyle}

.style(properties)
.style(name, value)
.style(name)
Source:

toggle()

Toggle an element's visibility using the hidden class
Source: