Skip to content

Commit

Permalink
fix(visibility): jquery scrollleft is a function rather than a property
Browse files Browse the repository at this point in the history
$context.scrollLeft must be replaced with $context.scrollLeft() otherwise it returns NaN.
  • Loading branch information
lubber-de authored Mar 5, 2020
1 parent 62bd670 commit ec615b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/definitions/behaviors/visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ $.fn.visibility = function(parameters) {
element.offset.top += $context.scrollTop() - $context.offset().top;
}
if(module.is.horizontallyScrollableContext()) {
element.offset.left += $context.scrollLeft - $context.offset().left;
element.offset.left += $context.scrollLeft() - $context.offset().left;
}
// store
module.cache.element = element;
Expand Down

0 comments on commit ec615b3

Please sign in to comment.