How to make the header sticky in the Helix Ultimate to reappear when scrolling down only?
Sticky header
Accepted answer
Marked as the solutionOh, indeed, but as I said before, this kind JS/CSS customization is on your hands only.
4 more replies
Hi Kugata,
If you have our template, just from settings. Template Options > Basic > Header > Sticky Header: On > Save & Close
I suggest change defult value for Sticky Offset , for example, use 0 or 1.
https://www.joomshaper.com/documentation/helix-framework/basic
If you have template from other seller/developer, you have to ask them , or use Custom CSS to make it possible.
Other header behavior customization, request using Custom CSS/JS and are on your hands only.
Paul, you didn't understand my question. I want the header sticky to appear only when scrolling down and disappear when scrolling up.
Template Helix Ultimate. Probably it is need to add some extra code to the file main.js?
The solution is
-
To add in the main.js after string 60:
window.onscroll = function() { scrollFunction(); }; function scrollFunction() { const header = document.getElementById("sp-header"); // Check if scrolling up/down if (window.scrollY < window.scroll.previousY) { header.classList.remove("header-hidden"); // Show header when scrolling up } else { header.classList.add("header-hidden"); // Hide header when scrolling down } window.scroll.previousY = window.scrollY; // Store current scroll position } 2. To add some CSS to the template: #sp-header{ transition: all .5s; &.header-hidden { top: -80px; } }