andreasefternamn Posted November 4, 2022 Posted November 4, 2022 I don't really know what I have done here, when you start scrolling on the site the logo shoots off into he distance for some reason, I would like it to stay still with the rest of the navigation bar. I used to have some code so the navigation bar and logo followed with the scrolling but I have removed that but for some reason that zoom thing is stll there. Can anyone help? https://www.motivationssmedjan.se/ password: lomma Thanks!
tuanphan Posted November 6, 2022 Posted November 6, 2022 Try remove this code from Code Injection > Header <script> $(document).on('scroll', function() { if ($(document).scrollTop() >= 1) { $('.Header-inner').css('padding-top', '1px').css('padding-bottom', '1px').css('transition', '0.3s'); } else { $('.Header-inner').css('padding-top', '').css('padding-bottom', '').css('transition', '0.3s'); } }); $(document).on('scroll', function() { if ($(document).scrollTop() >= 1) { $('.Header-branding-logo').css('width', '50px').css('transition', '0.3s'); } else { $('.Header-branding-logo').css('width', '').css('transition', '0.3s'); } }); $(document).on('scroll', function() { if ($(document).scrollTop() >= 1) { $('.Index').css('padding-top', '60px').css('transition', '0.3s'); } else { $('.Index').css('padding-top', '').css('transition', '0.3s'); } }); </script> 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!)
andreasefternamn Posted November 7, 2022 Author Posted November 7, 2022 Doh 🤯 Thanks Tuanphan, I was looking and looking but forgot about that... On 11/6/2022 at 4:09 AM, tuanphan said: Try remove this code from Code Injection > Header <script> $(document).on('scroll', function() { if ($(document).scrollTop() >= 1) { $('.Header-inner').css('padding-top', '1px').css('padding-bottom', '1px').css('transition', '0.3s'); } else { $('.Header-inner').css('padding-top', '').css('padding-bottom', '').css('transition', '0.3s'); } }); $(document).on('scroll', function() { if ($(document).scrollTop() >= 1) { $('.Header-branding-logo').css('width', '50px').css('transition', '0.3s'); } else { $('.Header-branding-logo').css('width', '').css('transition', '0.3s'); } }); $(document).on('scroll', function() { if ($(document).scrollTop() >= 1) { $('.Index').css('padding-top', '60px').css('transition', '0.3s'); } else { $('.Index').css('padding-top', '').css('transition', '0.3s'); } }); </script> tuanphan 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment