Global

Members

(constant) INCLUDE_DEBUG

Source:

Methods

checkIfHeight(value) → {boolean}

Source:

Check if the provided string contains height.

Parameters:
Name Type Description
value string

The string to test.

Returns:

the result as boolean.

Type
boolean

checkIfWidth(value) → {boolean}

Source:

Check if the provided string contains width.

Parameters:
Name Type Description
value string

The string to test.

Returns:

the result as boolean.

Type
boolean

getDecimalFromPercentage(value) → {number}

Source:

Get a decimal value from a percentage string.

Parameters:
Name Type Description
value string

The percentage as string.

Returns:

the percentage as decimal number.

Type
number

handlePercentage(domTarget, attribute, animateTo) → {string}

Source:

Converts the given percentage to pixel equvalent.

Parameters:
Name Type Description
domTarget HTMLElement

The DOM Node to get the height and width from.

attribute string

CSS attribute to check if it contains height or width.

animateTo string

The string with the end percentage.

Returns:

the result as string with px added.

Type
string

msToSeconds(value) → {string}

Source:

Convert miliseconds to seconds and add a s at the end.

Parameters:
Name Type Description
value number

The number to convert

Returns:

the result as string with a s at the end.

Type
string

Type Definitions

animation

Source:
Properties:
Name Type Attributes Default Description
attribute string

The CSS Attribute to animate.

animateTo various

The value the element animates to.

duration number <optional>
defaultDuration

The default CSS easing type.

easing string <optional>
defaultEasing

The default CSS easing type.

pctToScroll boolean <optional>
false

Converts animateTo percentage to pixel using scrollHeight and scrollWidth. Supported Attributes are: width/min-widt/max-width/height/min-height/max-height.

Type:
  • Object

options

Source:
Properties:
Name Type Attributes Default Description
target HTMLElement

The DOM Node to animate.

animations Array.<animation>

An array of the properties that will be animated, see Animations. At least one property required.

defaultDuration number <optional>
250

The default animation duration.

defaultEasing string <optional>
linear

The default CSS easing type.

DEBUG boolean <optional>
false

Show debug messages. ⚠ Only avaible in the *.debug.js version of the module.

Type:
  • Object