Solved

How to trigger animations on scroll over in Peachboom.de?

Shockpain21
Excursionist
20 0 3

Good evening,

so I have implemented from: https://animate.style/ animation to my shop: peachboom.de 

Everything went smoothly, but the animations are getting triggered as soon as the website load. I want the elements (images) to animate as soon as the customers scroll over them. The CSS code which I have currently on the theme.sccs file is:

.Rte .Form, .Rte .VideoWrapper, .Rte blockquote, .Rte img {
animation: fadeInLeft;
animation-duration: 3s;
}

Accepted Solution (1)
LamQSolutions
Shopify Partner
131 30 44

This is an accepted solution.

Hi @Shockpain21 

Was the problem resolved? I see that the animation is working.

Found my answer helpful? Please LIKE or Accept Solutions.
You may be interested in our apps
Scrolly Telling - Create scroll-based animations visually.
Ultimate Sections - Slideshow, Gallery, Collection, FAQs, Brand, Info box, Testimonial and more

View solution in original post

Replies 12 (12)

LamQSolutions
Shopify Partner
131 30 44

To do animation on scroll, you can follow these steps

1. Go to the file current theme > Layout > theme.liquid

2. Add the following to before the </head>

<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" />

3. Add the following code before the </body>

<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
  document.querySelectorAll('.Rte .Form, .Rte .VideoWrapper, .Rte blockquote, .Rte img').forEach(function (el) {
    el.dataset.aos = 'fade-right'
  });
  AOS.init();
</script>
Found my answer helpful? Please LIKE or Accept Solutions.
You may be interested in our apps
Scrolly Telling - Create scroll-based animations visually.
Ultimate Sections - Slideshow, Gallery, Collection, FAQs, Brand, Info box, Testimonial and more
Shockpain21
Excursionist
20 0 3

Thank you so much! But unfortunately this does not change the scroll over 😞

LamQSolutions
Shopify Partner
131 30 44

Hi,

Could you add the code below just before the </body>

<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
  document.querySelectorAll('.Rte .Form, .Rte .VideoWrapper, .Rte blockquote, .Rte img').forEach(function (el) {
    el.dataset.aos = 'fade-right'
  });
  AOS.init();
</script>
Found my answer helpful? Please LIKE or Accept Solutions.
You may be interested in our apps
Scrolly Telling - Create scroll-based animations visually.
Ultimate Sections - Slideshow, Gallery, Collection, FAQs, Brand, Info box, Testimonial and more
Shockpain21
Excursionist
20 0 3

Now it works! Thank you so much! But can I make it slower appear? And only once to animate, because it animates itself everytime I scroll over it again.

LamQSolutions
Shopify Partner
131 30 44

@Shockpain21 wrote:

Now it works! Thank you so much! But can I make it slower appear? And only once to animate, because it animates itself everytime I scroll over it again.


Hi,

You can try the following code

 

<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
  document.querySelectorAll('.Rte .Form, .Rte .VideoWrapper, .Rte blockquote, .Rte img').forEach(function (el) {
    el.dataset.aos = 'fade-right'
  });
  AOS.init({
    duration: 3000,
    once: true,
  });
</script>

 

Found my answer helpful? Please LIKE or Accept Solutions.
You may be interested in our apps
Scrolly Telling - Create scroll-based animations visually.
Ultimate Sections - Slideshow, Gallery, Collection, FAQs, Brand, Info box, Testimonial and more
LamQSolutions
Shopify Partner
131 30 44

This is an accepted solution.

Hi @Shockpain21 

Was the problem resolved? I see that the animation is working.

Found my answer helpful? Please LIKE or Accept Solutions.
You may be interested in our apps
Scrolly Telling - Create scroll-based animations visually.
Ultimate Sections - Slideshow, Gallery, Collection, FAQs, Brand, Info box, Testimonial and more
Shockpain21
Excursionist
20 0 3

Thank you so much! Everything worked smoothly.

LamQSolutions
Shopify Partner
131 30 44

It's my pleasure to help you 🙂

Found my answer helpful? Please LIKE or Accept Solutions.
You may be interested in our apps
Scrolly Telling - Create scroll-based animations visually.
Ultimate Sections - Slideshow, Gallery, Collection, FAQs, Brand, Info box, Testimonial and more
Jacquline
Excursionist
48 0 7

Hey @LamQSolutions , I added the code you gave in the exact places but it doesn't work for me.. Can you maybe help? 

Jacquline
Excursionist
48 0 7

I am sorry I didnt notice that this code also had to be added

 

.Rte .Form, .Rte .VideoWrapper, .Rte blockquote, .Rte img {
animation: fadeInLeft;
animation-duration: 3s;
}

 

Can you please tell me where it needs to be added, I am on the DAWN theme, and I dont have a theme.scss..

Abodhere
Visitor
1 0 0

bro please let me know what i will change? where a type the element i need to animation?


@LamQSolutions wrote:

Hi,

Could you add the code below just before the </body>

 

 

<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script>
  document.querySelectorAll('.Rte .Form, .Rte .VideoWrapper, .Rte blockquote, .Rte img').forEach(function (el) {
    el.dataset.aos = 'fade-right'
  });
  AOS.init();
</script>

 

 


 

SharmaPooja
Visitor
1 0 0

Thank you for sharing most informative one..Looking forward a lot from you.