Shopify themes, liquid, logos, and UX
URL: https://efpqlt6kjr4cbg3d-17240367.shopifypreview.com
Password: testcode123
I tried adding the code below into my theme.liquid below the <head> tag to basically make my header transparent (which it already is) and then once a user scrolls it will make the header background change colour but the code does not seem to be doing anything. Is there anything else I should be doing?
{% if template == 'index' %}
<style>
.scrolled-past-header .header-wrapper {
background-color: #fff;
transition: background-color 1000ms ease;
}
.scrolled-past-header .header-wrapper * {
color: #333;
transition: color 1000ms ease;
}
</style>
{% else %}
<style>
.shopify-section-group-header-group .header-wrapper {
background-color: #fff;
}
.shopify-section-group-header-group .header-wrapper * {
color: #333;
}
</style>
{% endif %}
Hi @emekayode,
We checked and your store link is not working.
Can you share with us your store's new URL and password (if any) so our team can check on that?
We would love to provide you with a solution for your issues.
Hi @emekayode,
We found someone with your exact problem. You can check out their useful solution for that here: https://stackoverflow.com/questions/74479210/add-class-on-scroll-not-working-in-shopify-enviroment
Hope this helps, and if you need further support, reply and we will be happy to answer any of your questions.
thanks for that, but I'm not particular sure where to even put those block of javascript and css code as the location of the code is what would enable it to work correctly
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024