aos icon indicating copy to clipboard operation
aos copied to clipboard

Activate animation only one time for all elements per page load

Open ska89abv opened this issue 3 years ago • 16 comments

This is:

  • Question

Expected Behavior

Hey is it possible to make the elements activate only 1 time when the page loaded? So animation will not play all the time you scroll up and down, but only the one first time you do it?

ska89abv avatar Dec 07 '20 15:12 ska89abv

From what I'm seeing documented (and I am just finding out about this repository), you should be able to set an attribute on your element to control this. Whatever element you are trying to animate once, set the attribute " data-aos-once='true' ". If you want ALL of your animated elements to only animate once, set your AOS.init({}) object with a property of "once: true".

Slyness98 avatar Dec 08 '20 21:12 Slyness98

Thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu. It worked perfectly. AOS.init({once: true});

ska89abv avatar Dec 09 '20 00:12 ska89abv

Hi dear thank you, I use it in next.js and it works for me.

MohammadHosseinBagheri avatar Sep 22 '21 19:09 MohammadHosseinBagheri

@Slyness98 Thanks dear It works. xD

ankitdetroja avatar Sep 25 '21 00:09 ankitdetroja

Podem adicionar também o "once: true," dentro de "AOS.init({ });" vai resolver o problema Exemplo:

AOS.init({ once: true, });

britoga avatar Nov 18 '21 11:11 britoga

for duration and active one time

AOS.init({ once: true, duration: 1200, });

Ahsan2001 avatar Nov 25 '21 00:11 Ahsan2001

AOS.init({once: true}); its works thanks guys

mtw404 avatar Mar 16 '22 04:03 mtw404

it's working in react , thanks

alighauridev avatar Jun 13 '22 00:06 alighauridev

Thank you guys it really helped me

Bijesky07 avatar Jun 21 '22 03:06 Bijesky07

It worked for me thanks!

anujrana78 avatar Sep 09 '22 08:09 anujrana78

Thanks

NaimurHera avatar Jan 14 '23 14:01 NaimurHera

thank you for a once: true,

Rymenj avatar Jan 25 '23 18:01 Rymenj

AOS.init({ once: true, });

mehir19 avatar Feb 09 '23 06:02 mehir19

Good Afternoon. It's possible to use AOS only scrolling down? I need to disable AOS when user scrolling up

arslanovngc avatar Apr 03 '23 08:04 arslanovngc

Good Afternoon. Yes, in react you have used once: true - useEffect(() => { AOS.init({ once: true, duration: 2000 }); }, []);

На пн, 3.04.2023 г. в 11:49 ч. Ismatillo @.***> написа:

Good Afternoon. It's possible to use AOS only scrolling down? I need to disable AOS when user scrolling up

— Reply to this email directly, view it on GitHub https://github.com/michalsnik/aos/issues/645#issuecomment-1493925332, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3LC3I6OJIU3TKV4JB2LB7TW7KFKNANCNFSM4UQTIDUA . You are receiving this because you commented.Message ID: @.***>

Rymenj avatar Apr 03 '23 11:04 Rymenj

From what I'm seeing documented (and I am just finding out about this repository), you should be able to set an attribute on your element to control this. Whatever element you are trying to animate once, set the attribute " data-aos-once='true' ". If you want ALL of your animated elements to only animate once, set your AOS.init({}) object with a property of "once: true".

thank you very much for that... I am working on a react project ... under script tag inside header of index.html file I have written it --- AOS.init({once: true,}); And it is working...thanks all

Sagar-in-CodingWorld avatar May 02 '23 19:05 Sagar-in-CodingWorld