Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi. I'm curious if it's possible to change a page's background color as the user scrolls, like done in this example.
In this example the class is the trigger for the JavaScript, and I'm not sure how I could do that in Shopify. Add a custom liquid section and put the <div class=""> there? That would tie up a lot of value section real estate, given we only have 25 per page.
Thank you.
Hi @hostilearth ,
This is Theodore from PageFly - Shopify Page Builder App.
Yes, you can change Shopify page background color on scroll using a custom Liquid section and Javascript.
Steps:
Create a Liquid Section:
Add Javascript:
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
I'm not sure what you're suggesting. Put the JavaScript in the custom liquid section between <style> </style>? I tried that originally, and it didn't work.
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024