Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

toggleClass

  • toggleClass(element: HTMLElement | NodeListOf<Element>, classes: string, condition: boolean): void
  • Toggles a single, or multiple classes to the given html element based on a given condition

    Parameters

    • element: HTMLElement | NodeListOf<Element>

      The element to toggle the class on

    • classes: string

      The class / classes to toggle

    • condition: boolean

      A condition to toggle the classes by

    Returns void

Generated using TypeDoc