Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 6fcf0f8

Browse files
authored
Merge pull request #4 from ryuran/fix/20minutes/offsetTop
fix offsetTop
2 parents fa82b0f + 52410d7 commit 6fcf0f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sticky.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
if (this.parentFromTop > this.offsetTop && this.parentFromTop < this.stuckLimit && !this.isSticked) {
168168
this.el.classList.add(this.options.stickClass);
169169
this.options.onStick(this.el);
170-
this.el.style.top = this.spacerHeight + 'px';
170+
this.el.style.top = this.offsetTop + 'px';
171171
}
172172

173173
// ON DESTICK

0 commit comments

Comments
 (0)