Jord2308 Posted September 2, 2020 Share Posted September 2, 2020 Site URL: https://bat-primrose-64j6.squarespace.com/config/ Hi, I wonder if anyone can help with a bit of code? I want the header logo to be invisible when you land on the page and only appear once you scroll down the page. There's a large hero logo on the first page so I don't want two logos on the screen at the same time. I've set the header to be fixed so that's sorted, it's just getting the code so the logo is invisible and then appears. Thanks in advance Jordan Link to comment
tuanphan Posted September 2, 2020 Share Posted September 2, 2020 Add to Home > Design > Custom CSS .header-title-logo img { visibility: hidden; } .shrink .header-title-logo img { visibility: visible; } nickstein 1 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
Jord2308 Posted September 2, 2020 Author Share Posted September 2, 2020 That' s worked first time!! Thank you so much!! Lifesaver!! Link to comment
nickstein Posted March 12, 2021 Share Posted March 12, 2021 Hey @tuanphan, Thanks so much - this worked great for me too! Is it possible to do this so the logo fades/slides in gradually? Beyondspace 1 Link to comment
tuanphan Posted March 23, 2021 Share Posted March 23, 2021 On 3/13/2021 at 2:39 AM, CritiquesOverCoffee said: Hey @tuanphan, Thanks so much - this worked great for me too! Is it possible to do this so the logo fades/slides in gradually? Hi. Can you share link to your site? WE can check easier nickstein 1 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
nickstein Posted March 23, 2021 Share Posted March 23, 2021 Hey @tuanphan, Thanks for getting back to me. I got this to work with help from @bangank36 on a different thread. Site: drirykl.squarespace.com PW: drirykl and the code that worked was: .header-title-logo { opacity: 0; position: relative; top: -10vh; transition: all 0.75s; } .shrink .header-title-logo { opacity: 1; position: relative; top: 0; } Beyondspace and 44degreesnorth 1 1 Link to comment
daviesbrand Posted April 19 Share Posted April 19 @tuanphan Thanks for the above – super helpful. Would you be able to help me get the logo to appear after a certain point on the page? I'd like it to appear once off the first section. harp-oriole-9bt6.squarespace.com pw: hoddlestreet Thanks! Link to comment
tuanphan Posted April 22 Share Posted April 22 On 4/19/2023 at 2:06 PM, daviesbrand said: @tuanphan Thanks for the above – super helpful. Would you be able to help me get the logo to appear after a certain point on the page? I'd like it to appear once off the first section. harp-oriole-9bt6.squarespace.com pw: hoddlestreet Thanks! You mean logo will disappear when users scroll to section 2? 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
daviesbrand Posted May 1 Share Posted May 1 On 4/22/2023 at 10:48 AM, tuanphan said: You mean logo will disappear when users scroll to section 2? I'd like the small black logo to appear when users scroll to section 2 Thanks! Link to comment
tuanphan Posted May 3 Share Posted May 3 Try adding to Last Line in Code Injection > Footer <script> $(window).scroll(function(){ var scroll = $(window).scrollTop(); if(scroll > 900){ $('header#header').addClass('scrollNav'); } else{ $('header#header').removeClass('scrollNav'); } }); </script> <style> header#header img { opacity: 0; transition: all 0.3s; } .scrollNav img { opacity: 1 !important; transition: all 0.3s; } </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