up.element up.element.numberAttr(element, attribute)
JavaScript function

Returns the value of the given attribute on the given element, cast to a number.

If the attribute value cannot be cast to a number, undefined is returned.


Parameters

element
required

The element from which to retrieve the attribute value.

Type: Element
attribute
required

The attribute name.

Type: string

Return value

The cast attribute value.

Type: number | undefined