All things Shopify and commerce
Is there a code I can copy?
Hello @randytheasian ,
Yes possible but not possible to provide instructions for it as it needs multiple changes.
If you are looking for an idea please follow:
1) Disable the default sticky feature.
2) Write JS which will add a fixed class to the header when it reaches a second second or specific position.
3) Assign css to the class which we added in step 2nd.
In this way the header will work as you need.
Problem solved don't forget to Like it and Mark it as Solution!
If you need help to implement it you can contact me for services
You can find the email in the signature below.
Regards
Guleria
Great, could you provide me the codes?
Hi @randytheasian,
This is Kate from PageFly - Landing Page Builder App.
You can try this code by following these steps:
<script>
var elementToHide = document.querySelector('[data-sticky-type="reduce-logo-size"]');
var targetElement = document.getElementById("shopify-section-template--18249715876071__featured_collection_dExk9t");
window.onscroll = function () {
const targetRect = targetElement.getBoundingClientRect();
if (targetRect.top <= window.innerHeight / 2 && targetRect.bottom > 0) {
elementToHide.style.display = 'block';
} else {
elementToHide.style.display = 'none';
}
};
</script>
Hope that my solution works for you.
Best regards,
Kate | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
➜ Unlock the secrets to a record-breaking BFCM with PageFly and Canva
➜ Optimize your Shopify store with PageFly Page Builder (Free plan available)
➜ Weekly updated Shopify tutorials on YouTube
All features are available from the Free plan. Live Chat Support is available 24/7.
Thanks for responding. Unfortunately, the slideshow banner is overlay the header and it doesn't stop before the banner. Any solution?
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024