Function scrollToElement

Scroll window to make HTMLElement visible

  • Parameters

    • element: HTMLElement

      Element to scroll to

    • offset: number = 0

      Scroll offset from element, zero by default

    • smoothScroll: boolean = true

      Enable smooth scroll if supported, true by default

    Returns void

    void