dinoule Posted March 1, 2020 Share Posted March 1, 2020 Hello everyone, Sorry for my basic question, I would like to write the most properly and correctly possible a smooth scroll when I click in a div in my Product.tpl page it leads me to another div by a smooth scroll. I have done the anchor but I don't manage to put the javascript in my page, and I know it is not the most correct way or adding a javascript. Can someone help me please? Thanks Link to comment Share on other sites More sharing options...
Daresh Posted March 1, 2020 Share Posted March 1, 2020 Smooth scroll should be possible with just some CSS: html { scroll-behavior: smooth; } Link to comment Share on other sites More sharing options...
dinoule Posted March 1, 2020 Author Share Posted March 1, 2020 Thanks so much, but I see that it is not supported by Internet Explorer and Safari. Do you have another solution please? Or anyone? If I use a Javascript, should I put it in a plugin to write it properly? Thanks for your help Link to comment Share on other sites More sharing options...
Daresh Posted March 1, 2020 Share Posted March 1, 2020 https://css-tricks.com/snippets/jquery/smooth-scrolling/ If it's for product pages, putting the code to product.js should be enough. Link to comment Share on other sites More sharing options...
dinoule Posted March 1, 2020 Author Share Posted March 1, 2020 Thanks very much for your help! 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