ricardoflores Posted July 1, 2019 Share Posted July 1, 2019 Hello, Hello how I can I insert my own java script code into cms pages of my template in prestashop? I Have this page in my shop: https://the-skin-clinic.co.uk/content/6-contouring-facial-serum . I want to insert this code: ----------------------------------------------------------------------------------------------------- window.onscroll = function () { myFunction() }; function myFunction() { if (document.body.scrollTop > 270 || document.documentElement.scrollTop > 270) { document.getElementById("myContent").className = "AnimationTopFadeOut"; } if (document.body.scrollTop > 670 || document.documentElement.scrollTop > 670) { document.getElementById("myContent2").className = "AnimationTopFadeOut"; } if (document.body.scrollTop > 1070 || document.documentElement.scrollTop > 1070) { document.getElementById("myContent3").className = "AnimationTopFadeOut"; } } ----------------------------------------------------------------------------------------------------- This code that I made is to add an animation when scrolling the text apears. How can I do that? Link to comment Share on other sites More sharing options...
mootookoi Posted July 1, 2019 Share Posted July 1, 2019 Hello, Put your code in themes/PRS040081/assets/js/custom.js Link to comment Share on other sites More sharing options...
ricardoflores Posted July 1, 2019 Author Share Posted July 1, 2019 I already insert the code there but it does not work Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now