Jump to content

Adding a new animation effect to my site: scrollReveal.js


franciccio-ITALIANO
 Share

Recommended Posts

Hi, I read this and I would like add it to my site.

https://www.gavick.com/blog/scrollreveal-js-the-easiest-way-to-create-on-scroll-animations
Excuse me if it's off topic!
My probem is:

 

I add the new js file in folder of the site (...assets/js/scrollReveal.js), then I add the code in the html page :

     <!--SCROLL ANIMATION SCRIPTS-->
    <script src="assets/js/scrollReveal.js"></script>

 

Then I add: data-scroll-reveal="enter from the bottom after 0.9s" near the css class

 

But the js effect don't start.

I read this:
https://www.gavick.com/blog/scrollreveal-js-the-easiest-way-to-create-on-scroll-animations

where the chef say:
 

Then, to include library, please open the template/layout/blocks/head.php file and use this code:

1
$this->API->addJS($this->API->URLtemplate() .'/js/scrollreveal.js');
 

That’s all you need to do, and the library is now good to go. 

Now, it's necessary in processwire add that api code in the head.php file?
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...