• About the Connect JavaScript API
  • Context
  • Cookie
  • Dialog
  • Events
  • Flag
  • History
  • Host
  • Iframe
  • Inline dialog
  • Jira
  • Navigator
  • Request
  • Scroll position
  • User

Scroll-position

Enables apps to get and set the scroll position.

Methods

getPosition (callback)

Gets the scroll position relative to the browser viewport

Parameters

NameTypeDescription
callbackfunction

callback to pass the scroll position

Example

1
AP.scrollPosition.getPosition(function(obj) { console.log(obj); });

setVerticalPosition (y, callback)

Sets the vertical scroll position relative to the iframe

Parameters

NameTypeDescription
yNumber

vertical offset position

callbackfunction

callback to pass the scroll position

Example

1
AP.scrollPosition.setVerticalPosition(30, function(obj) { console.log(obj); });

  • System status
  • Privacy
  • Developer Terms
  • Trademark
  • Cookie Preferences
  • © 2019 Atlassian