kit
    Preparing search index...

    Function setDataAttr

    • Set data attribute

      Type Parameters

      • T extends Element

      Parameters

      • element: T
      • attribute: string

        The name of the data-{attr}

      • Optionalvalue: string | number | boolean | null

        The value to set, null or undefined will remove the attribute

      Returns void