Function transitionElementNow

Removes the given fromCls class and adds the given toCls class to the element.

Unlike DOMTokenList:replace, this will always add toCls even if fromCls isn't in the element's class list.

  • Parameters

    • element: Element
    • fromCls: string
    • toCls: string

    Returns boolean

    True if there was a change made (class removed or added), false otherwise.