Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

configureScrollToTopOf

  • configureScrollToTopOf(configuration: ScrollToTopOfConfiguration): void
  • Helper to define the default configuration for the scroll methods

    Parameters

    • configuration: ScrollToTopOfConfiguration
             Should receive an object with the following options:
             - duration: (Default 300) The speed in milliseconds the scroll operation should take
             - offset: (Default 0) The offset to the top of the page when scrolling up
             - container: (Default null) The container to scroll instead of the window
      

    Returns void

scrollToTopOf

  • scrollToTopOf(target?: HTMLElement | null, options?: ScrollToTopOfConfiguration): undefined | Promise<undefined | string | HTMLElement | Window>
  • Scrolls either the whole page or a specific element with the data attribute "data-scroll-target" to the top of the element which is given as $o.

    Parameters

    • Optional target: HTMLElement | null

      The object to which we should scroll

    • Optional options: ScrollToTopOfConfiguration

      Additional options for this scroll operation - duration: (Default 300) The duration in milliseconds the scroll operation should take - offset: (Default 0) The offset to the top of the page when scrolling up - container: (Default null) The container to scroll instead of the window

    Returns undefined | Promise<undefined | string | HTMLElement | Window>

Generated using TypeDoc