Problem With Scroll Down Button

Topic summary

A user is experiencing an issue with a scroll-down button on a Shopify product page for “Tartan Finder” products. When clicked, the button should scroll to a featured collection section but currently doesn’t function.

Current Implementation:

  • Uses jQuery to animate scroll to section ID #shopify-section-template--17448925298850__featured_collection_QT37GX
  • Button styled with custom CSS and conditionally displayed for Tartan Finder product types

Proposed Solution:
A PageFly representative suggested replacing the jQuery selector from the specific section ID to [data-section-type="featured-collection"] to target the section more reliably.

Status:
The issue remains unresolved. The user reported that after implementing the suggested code change, the button’s appearance changed unexpectedly (shown in screenshot), indicating the fix didn’t work as intended. No further solutions have been provided yet.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hello Guys,

I am facing issue on product page when click on button page not goto scroll down. Attached is screenshot I highlited in red color button when click on it page should be scroll down

Here is product page https://imperialhighlandsupplies.com/products/abbotsford-check-tartan

Here is code i am use.

Thank you

{% if product.type == 'Tartan Finder' %}
              <style>
               #go_down {
    background: #3b0e57;
    color: #fff;
    border: 1px solid #3b0e57;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    margin: 15px 0;
    width: 100%;
    font-weight: bold;
}
            </style>
                
                <div style="text-align:center;">
               <div id ="go_down">View Products in {{ product.title }}</div>
                </div>
<div class="addthis_inline_share_toolbox"></div>
            <script>
      $("#go_down").click(function() {
     $('html,body').animate({
         scrollTop: $("#shopify-section-template--17448925298850__featured_collection_QT37GX").offset().top},
         'slow');
        // window.location.href = '/collections/tartan-finder';
});
</script>
{% endif %}
{% unless product.type == 'Tartan Finder' %}
<style>
#shopify-section-template--17448925298850__featured_collection_QT37GX {
display: none;
}
</style>
{% endunless %}

Hi @Everything1

This is Richard from PageFly - Shopify Page Builder App

Regarding your concern, simply update your js code to be like this

$("#go_down").click(function() {
     $('html,body').animate({
         scrollTop: $('[data-section-type="featured-collection"]').offset().top},
         'slow');
});

Hope this can help you solve the issue

Best regards,

Richard | PageFly

Thanks for your reply. code not work after paste the code button look like this