Hi I have 2 issue, issue 1 :
I have code my header transparent and visible only on scroll up on my theme.liquid it worked perfect for my home page but the problem is that it didn’t applied to all my pages, i checked and it’s not normal it should have applied to all the page following how shopify code work so i would like to know if there is another way to code that ? That’s the code that i had for it. I tried to contact shopify but they didn’t understand and asked me to talk to a shopify expert so here we are.
document.addEventListener("DOMContentLoaded", function() {
let lastScrollTop = 0;
const header = document.querySelector(".header-wrapper");
window.addEventListener("scroll", function() {
let scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if (scrollTop === 0) {
// At the top of the page
header.classList.remove("scrolled-up", "scrolled-down");
} else if (scrollTop > lastScrollTop) {
// Scrolling down
header.classList.remove("scrolled-up");
header.classList.add("scrolled-down");
} else {
// Scrolling up
header.classList.remove("scrolled-down");
header.classList.add("scrolled-up");
}
lastScrollTop = scrollTop;
});
});
{%- if settings.predictive_search_enabled -%}
{%- endif -%}
{% if template == 'index' %}
{% endif %}
Now my second issue, I would like to change the position of my heading on my banner but only on phone version i gonna try to code it today myself but in case if one of you know the answer it will more easy haha here is my shopify url : https://supremeautosource.com/ Thank you for your help !
