How can I make the page automatically scroll to the top when I click the button to select that

Topic summary

Request to auto‑scroll the product page to the first image when a color (variant) is selected in a Shopify store using the Prestige theme.

Context: The store owner shared their product and home URLs and asked for this behavior on both mobile and desktop. Support initially asked for the URL and noted that color swatches already work; the user clarified the feature request (not a bug) and referenced another site showing the desired auto‑scroll.

Clarification: The goal is for the page to automatically scroll to the top/product media when a color option is clicked, similar to the referenced example. Color selection itself works correctly.

References/attachments central to understanding: A comparison site link, a screenshot, and a short video demonstrating the auto‑scroll behavior.

Status/outcome: No code or solution provided yet. The thread remains open, with the next step being implementing JavaScript to scroll to the product media section on variant change across devices.

Summarized with AI on December 23. AI used: gpt-5.

When I select a color, my webpage stays still. I want it to scroll to the first image when a color is selected.

Tôi đang dùng theme

Prestige

Hello @Mango5
Can you please share Your Store URL? So I Will check and Provide a proper solution
Thanks

I can help you with that.
Could you please share your store URL with me?

https://leblancofficial.com/products/dr43

Here it is, sir. For the color section, I want it to scroll up to the product image on both mobile and desktop.

https://leblancofficial.com/

Here it is, sir. For the color section, I want it to scroll up to the product image on both mobile and desktop.

Can you help me?

I can help you but not sure what’s the actual issue. I reviewed this product and the color swatches working fine for me
https://leblancofficial.com/products/dr43?variant=43834754433231

Could you please explain it details what I need to do to replicate this issue?

Yes, the color selection works well. But I want my page to scroll to the top when I select a color, like it does on this website: “https://wiskiiactive.com/collections/2024-new-release/products/scallop-back-mock-neck-bra”.

So you want this ?

https://files.fm/u/xf964jgffw

It’s like this video sir. It will automatically scroll up.

help me