Jump to content

Recommended Posts

Posted

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?
 

Posted

I suggest you to put your js inside the "script" folder pw provides, if you need to leave them where they actually are (assets/js) your url should be "../assets/js" since they are relative to the templates folder.

 

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
×
×
  • Create New...