Skip to main content

Bug Tracker

Side navigation

#15239 closed bug (migrated)

Opened September 11, 2014 10:55PM UTC

Closed October 16, 2014 05:53PM UTC

.position on table rows inside a relative div container gives different results based on scroll position

Reported by: ripdog Owned by:
Priority: undecided Milestone: 1.12
Component: dimensions Version: 1.11.1
Keywords: Cc:
Blocked by: Blocking:
Description

The [docs for .position()](http://api.jquery.com/position/) clearly state that they return the "current position of an element relative to the offset parent." - explicitly not the position based on the viewport. However, .position does report different results based on where it is moved on the page due to scrolling.

Here's a fiddle: http://jsfiddle.net/6g5upsvq/ Click the button, then scroll and click it again. The .offsetTop direct from the DOM stays constant, but .position changes.

Attachments (0)
Change History (1)

Changed October 16, 2014 05:53PM UTC by m_gol comment:1

resolution: → migrated
status: newclosed