Smooth Auto Scroll on Page Load

New Member
4 0 0

I have an one product page where the featured product is at the bottom of the main page.

I want the page to auto scroll (but smoothly) to that section of the page unless they stop it by touching the screen.

I want this to be on load as well so when they click the link, the page starts scrolling down automatically until that section. Thanks in advance to anyone!

0 Likes
Shopify Partner
1125 90 137

Hi,

 

Hope you are doing well.

Can you share your website URL, so i can have a look into it.

 

Thank and Regards

Perennial Solution

infoperennialsolution@gmail.com

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
New Member
4 0 0

Check your messages. Thanks

0 Likes
Shopify Partner
1125 90 137

Thanks for providing URL. As per my understanding, you would like to scroll down till bottom but my question is where should I click to make it automatic scroll?

I mean, it is possible to implement on the normal navigation menu bar. Please advise.

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
New Member
4 0 0

I want it to automatically scroll down to the featured product. They don't have to click anywhere, it just scrolls down when the page loads

0 Likes
Shopify Partner
1125 90 137

hi,@

 

use this code 

 

{% if template == 'index' %}

<script>
$(window).load(function() {
window.location.href = 'https://firebuds.co/#FeaturedProduct-1568393642889';
});
</script>

{% endif %}

 

this code put in bottom of theme.liquid 

 

if you face any issue please feel free to reach out.

 

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes
New Member
4 0 0

I put it at the bottom of the theme and it didn't work. I want the page to auto scroll to the featured product. I'm guessing this code makes it load first

0 Likes
Shopify Partner
1125 90 137

Oh, it worked at my end so I gave it to you after testing at my end.

I need to dig in further so would you mind providing access to your store?

 

Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
0 Likes