michalsnik / aos

Animate on scroll library
MIT License
26.53k stars 2.57k forks source link

data-aos-callback #430

Open aaronshier opened 5 years ago

aaronshier commented 5 years ago

This is:

Specifications

FEATURE Behavior

data-aos-callback="myJsFunction()" Would fire a function once an animation has completed.

Actual Behavior

: ( doesnt exist

Amazing use cases

  1. Chained animations triggered by an initial animation view
  2. Sound reactive websites.
  3. Fire off custom GA events when an animation was viewed by a user

Possible Solution

data-aos-callback would simply fire off a function when the animation has completed and the item is set in its final position. Used with data-aos-once="false" things like event tracking.

kingafrojoe commented 5 years ago

This would be so useful! it could also be implemented like this: AOS.init({ row_callback: function(row){ // Do something :) }, });`

jpike88 commented 3 years ago

arghhhh this would be amazing