Skip to main content

getElementAttributeOrCssValue

A utility function that first tries getting the value for given name using getElementAttribute. If not found, getElementCssValue is tried.

getElementAttributeOrCssValue(elemId, property)

Parameters#

  • elemId: The target element
  • name: The attribute name or property name to search

Returns#

  • Found value or nothing if no value exists