Skip to content

Commit 03963ce

Browse files
committed
fix "position:fixed"
fix "position:fixed"
1 parent df20761 commit 03963ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dist/scrollReveal.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
(function(root, factory) {
32
if (typeof define === 'function' && define.amd) {
43
define(factory);
@@ -364,7 +363,9 @@ window.scrollReveal = (function (window) {
364363
elBottom = elTop + elH,
365364
h = h || 0;
366365

367-
return (elTop + elH * h) <= viewed && (elBottom) >= scrolled;
366+
return (elTop + elH * h) <= viewed
367+
&& (elBottom) >= scrolled
368+
|| (el.currentStyle? el.currentStyle : window.getComputedStyle(el, null)).position == 'fixed';
368369
},
369370

370371
extend: function (a, b){

0 commit comments

Comments
 (0)