justinpheap.co Posted February 22 Share Posted February 22 I'm currently using a scrolling header option that transitions from transparent to a solid color when you begin scrolling (on version 7.1). How can I adjust the header transition timing so that the solid color doesn't arrive until the user hits the second section, if you will? For example, please see the pair of screenshots. The transparent header transitions to a black solid background almost immediately; I'd like it to transition to a black solid background at the transition between the hero and the Contact Us section. Link to comment
tuanphan Posted February 24 Share Posted February 24 Can you share site url? We can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
justinpheap.co Posted March 20 Author Share Posted March 20 www.teamdb.solutions is the URL Link to comment
tuanphan Posted March 25 Share Posted March 25 Try this code to Website > Website Tools > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(function(){ var visibleTop = 800; $(window).scroll(function() { var scroll = getCurrentScroll(); if ( scroll >= visibleTop ) { $('header#header').addClass('test-something'); } else { $('header#header').removeClass('test-something'); } }); function getCurrentScroll() { return window.pageYOffset || document.documentElement.scrollTop; } }); </script> <style> header#header { background-color: transparent !important; } header#header.test-something { background-color: #000 !important; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment