Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

getScrollPos

  • getScrollPos(container?: HTMLElement | Window, horizontal?: boolean): number
  • Returns the vertical scroll position of either the window or the given container object Returns 0 if not called in a browser

    Parameters

    • Optional container: HTMLElement | Window

      An optional container element to get the scroll position of, otherwise the window is used

    • Optional horizontal: boolean

      If set to true the horizontal (X) scroll position is returned, instead of the default (Y)

    Returns number

Generated using TypeDoc