Skip to content

Commit

Permalink
fix(parallax): getting currentScrollPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBGod committed Feb 28, 2017
1 parent 4a513d5 commit 850b2b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin/parallax.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class ScrollSpyParallaxDirective implements OnInit, AfterViewInit, OnDest

evaluateScroll(target: any) {
let currentScrollPosition: number;
if (target.scrollTop) {
if (typeof target.scrollTop !== 'undefined') {
currentScrollPosition = target.scrollTop;
} else if (typeof target.scrollingElement !== 'undefined') {
currentScrollPosition = target.scrollingElement.scrollTop;
Expand Down

0 comments on commit 850b2b7

Please sign in to comment.