• Gradually hides the specified HTML element by reducing its opacity over a given duration, then setting its display style to none.

    Parameters

    • element: HTMLElement

      The HTML element to be hidden.

    • duration: number = 400

      The duration over which the element's opacity should be reduced, in milliseconds. Defaults to 400ms.

    Returns void

    Throws

    If the provided element is null or undefined.

    See

    Example

    // Get an element by its GUID
    const targetElement = ix.api.dom.getHtml("<ELEMENT-GUID>");

    // Hide the target element over a period of 400ms
    ix.api.dom.hide(targetElement);

    // Hide the target element over a period of 1000ms
    ix.api.dom.hide(targetElement, 1000);