albanyfarms Posted February 19, 2022 Share Posted February 19, 2022 Site URL: https://www.albanyfarms.com/ I want my navigation to disappear when they scroll down but reappear when they scroll up. Anyone know how to code this for version 7.0 in the brine template? Similar to this website does: https://www.jonesbbqkc.com/ Link to comment
albanyfarms Posted February 21, 2022 Author Share Posted February 21, 2022 @tuanphan do you know? Link to comment
tuanphan Posted February 25, 2022 Share Posted February 25, 2022 On 2/21/2022 at 8:02 PM, albanyfarms said: @tuanphan do you know? Hi, Add this code to Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(function(){ var visibleTop = 30; $(window).scroll(function() { var scroll = getCurrentScroll(); if ( scroll >= visibleTop ) { $('header#header').addClass('tuan'); } else { $('header#header').removeClass('tuan'); } }); function getCurrentScroll() { return window.pageYOffset || document.documentElement.scrollTop; } }); </script> <style> .tuan div#headerNav { visibility: hidden !important; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care 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