jlmakes / jlmakes/scrollreveal

ScrollReveal element disappears in a certain resolution

Open
#563 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22.5k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

Hi all.
Let me start by saying that i'm a really really junior dev so I'm sorry if I'm not explaining well or doing things correctly!

I'm using ScrollReveal to animate some divs of my html file. It works fine but I've noticed something:

Using Google inspect to check on a mobile view, works fine;
Viewing the page my desktop monitor (2560x1440), works fine;
But when I move the window to my laptop the .reveal-7 div just disappears. It starts doing the inverse animation. It seams its regarded with the size of the window because opening it on my desktop monitor and the resizing the window does that issue.

Here's my SCSS code.
```@for $i from 1 through 7 {
.reveal-#{$i} {
visibility: hidden;
}
}
```

My HTML example:
```


Example




>



>



>

Example



>



>


```

My JS:
```document.addEventListener("DOMContentLoaded", function () {
window.sr = ScrollReveal({reset: true});
for(let i= 1; i <= 7; i++) {
sr.reveal(`.reveal-${i}`, {duration: i*600});
}
});
```

Any idea why is it happen?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.