- Source:
Methods
absoluteOffsetTop(containerElement) → {number}
Calculate the absolute offset to the top.
does this recursively up the DOM
Parameters:
Name | Type | Description |
---|---|---|
containerElement |
object | the Element to check its absolut top for |
- Source:
Returns:
absolute top in px
- Type
- number
addClassName(name) → {Element}
Add a class name to an Element
Parameters:
Name | Type | Description |
---|---|---|
name |
string | class to add |
- Source:
Returns:
the originating element
- Type
- Element
addRemoveClass(className, add) → {Element}
Add or remove a class name to an Element
Parameters:
Name | Type | Description |
---|---|---|
className |
string | name of the class |
add |
boolean | true if it should be added, false otherwise |
- Source:
Returns:
the originating element
- Type
- Element
elementStyle() → {object}
Element Style object of an element
- Source:
Returns:
element style object
- Type
- object
hasClassName(name) → {boolean}
If an element has a class name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | class to check for |
- Source:
Returns:
true if Element has class name
- Type
- boolean
isCurrent() → {boolean}
Check if the Element is active. Looks for the Element to have the 'active' class name
- Source:
Returns:
true if it is the currently active
- Type
- boolean
isEnabled() → {boolean}
Check if the Element is enabled. Looks for not having the 'disabled' class name
- Source:
Returns:
true if enabled
- Type
- boolean
removeClassName(name) → {Element}
Remove a class name from an element
Parameters:
Name | Type | Description |
---|---|---|
name |
string | class to remove |
- Source:
Returns:
the originating element
- Type
- Element
setEnabled(enabled) → {Element}
Shortcut to add or remove the class name 'disabled'
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean | true to enable and remove the 'disabled' class name |
- Source:
Returns:
the originating element
- Type
- Element
setIsCurrent(active) → {Element}
Shortcut to add or remove the class name 'active'
Parameters:
Name | Type | Description |
---|---|---|
active |
boolean | true to set and remove the 'active' class name |
- Source:
Returns:
the originating element
- Type
- Element
stylePropertyValue(name)
Returns the calculated value of a property of the elements CSS
Extracted from: https://css-tricks.com/get-value-of-css-rotation-through-javascript/
Parameters:
Name | Type | Description |
---|---|---|
name |
string | property name to get the value from |
- Source: