Skip to content

Commit fc0ae57

Browse files
committed
offsetTop option renamed into stickAfter as it has nothing with element's offsetTop property
1 parent db648a6 commit fc0ae57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/web/mage/sticky.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ define([
1313
options: {
1414
container: '',
1515
spacingTop: 0,
16-
offsetTop: 0,
16+
stickAfter: 0,
1717
stickyClass: '_sticky'
1818
},
1919

@@ -56,7 +56,7 @@ define([
5656
var offset,
5757
isStatic,
5858
stuck,
59-
offsetTop;
59+
stickAfter;
6060

6161
isStatic = this.element.css('position') === 'static';
6262

@@ -68,9 +68,9 @@ define([
6868
offset = Math.max(0, Math.min(offset, this.maxOffset));
6969

7070
stuck = this.element.hasClass(this.options.stickyClass);
71-
offsetTop = this._getOptionValue('offsetTop');
71+
stickAfter = this._getOptionValue('stickAfter');
7272

73-
if (offset && !stuck && offset < offsetTop) {
73+
if (offset && !stuck && offset < stickAfter) {
7474
offset = 0;
7575
}
7676

0 commit comments

Comments
 (0)