user3053134
user3053134

Reputation: 21

Animate on scroll library in sharepoint not working

I'm trying to use this Animate on scroll library: https://michalsnik.github.io/aos/

on my Sharepoint(2016) page

and it doesn't work when scrolling. and I don't know what needs to be changed.

Upvotes: 1

Views: 411

Answers (1)

Kashif Ahmed Khan
Kashif Ahmed Khan

Reputation: 41

Binding it to their custom ‘master’ div, instead of the body/window will work:

<script>
jQuery('#s4-workspace').bind( 'scroll', function(){
  AOS.init({
  duration: 1000
});
});

   // AOS.init({
   //    offset: 200,
   //    duration: 600,
   //    easing: 'ease-in-sine',
   //    delay: 100,
   //  });
</script>

Upvotes: 4

Related Questions