Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
On my SHOP page, I have COLLECTIONS right under the main header section: https://tgdbling.com/collections/all
When I click on a collection, it loads the correct products, but it doesn't move the screen down to the actual products... the page stays anchored at the top of the page... which I find to awkward. At first glance, it can appear that the link doesn't take the user anywhere.
Is there a way to change this? Can I set an anchor tag or something so that it functions intuitively? Thanks so much.
Hello @tgdbling ,
Try to add this script in theme.liquid just before the </body> tag
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
{% comment %} Don't use above library if its already availabe. {% endcomment %}
<script>
$(document).ready(function(){
$('html, body').animate({
scrollTop: $(".collection-list-wrapper").offset().top
}, 2000);
});
</script>
Thanks
Thank you I will try it and let you know! Thank you for your response!!!
So I've done it.... I refreshed my browser and checked it and no change. I also checked it in a different browser in case it was a cache issue, no change.
So I'm open to other suggestions and options. Thank you so much.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025