We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4e3627 commit 6014692Copy full SHA for 6014692
arlon/src/index.js
@@ -33,15 +33,15 @@ $(document).ready(function () {
33
//scroll
34
35
const animatedElements = document.querySelectorAll(
36
- ".swiper-image, .home-citoyen-image-container, .a-la-une"
+ ".swiper-image, .home-citoyen-image-container, .a-la-une",
37
);
38
39
window.addEventListener("scroll", () => {
40
animatedElements.forEach((img) => {
41
const rect = img.getBoundingClientRect();
42
const progress = Math.min(
43
Math.max(1 - rect.top / window.innerHeight, 0),
44
- 1
+ 1,
45
46
const translate = -70 * progress; // monte jusqu’à -10px
47
const rotate = 30 * progress; // tourne jusqu’à 10deg
0 commit comments