a_dltg Posted September 6 Share Posted September 6 Hi, In my website header, I have a "fixed position" logo centered (fixed header style - Basic), which means that the logo stays in position when I scroll down. I am looking to achieve a "scroll to top" effect when I click on the logo, is that possible ? Note that I don't have the code injection feature available. Many thanks in advance. Link to comment
tuanphan Posted September 9 Share Posted September 9 Can you share site url? 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
a_dltg Posted September 9 Author Share Posted September 9 Hi @tuanphan Of course: https://andreadeletang.com password: goodvibes Thanks a lot. Link to comment
tuanphan Posted September 10 Share Posted September 10 You mean When users scroll down >> If they click on logo >> it will scroll to top of page without reloading the page? 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
a_dltg Posted September 11 Author Share Posted September 11 Yes exactly, and I would like this same behaviour on every pages. Thanks. Link to comment
tuanphan Posted September 13 Share Posted September 13 On 9/11/2024 at 9:06 PM, a_dltg said: Yes exactly, and I would like this same behaviour on every pages. Thanks. Try this to Website Tools > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function(){ $('div.header-title a').attr('href','#'); }); </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!) Link to comment
a_dltg Posted September 13 Author Share Posted September 13 Hi @tuanphan thanks for this, as I said I don't have the code injection feature in my plan. So I was wondering if there is another way of achieving this. Thanks Link to comment
tuanphan Posted September 17 Share Posted September 17 On 9/13/2024 at 6:17 PM, a_dltg said: Hi @tuanphan thanks for this, as I said I don't have the code injection feature in my plan. So I was wondering if there is another way of achieving this. Thanks You can edit Site Footer > Add a Block > Choose Markdown > Paste the code 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
a_dltg Posted September 17 Author Share Posted September 17 Hi @tuanphan thanks! It looks like it works only one time when I click on it, the second time it doesn't work, I need to refresh the page. Do you have any idea on how to fix it ? Link to comment
a_dltg Posted September 19 Author Share Posted September 19 @tuanphan it looks like it's more related to the browser in fact, because it works fine with Chrome! 🙂 However, is is possible to reduce the speed of the 'back to top' effect ? Thanks! Link to comment
tuanphan Posted September 20 Share Posted September 20 23 hours ago, a_dltg said: @tuanphan it looks like it's more related to the browser in fact, because it works fine with Chrome! 🙂 However, is is possible to reduce the speed of the 'back to top' effect ? Thanks! You can use this to Website Tools > Custom CSS html { scroll-behavior: smooth; } 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
a_dltg Posted September 20 Author Share Posted September 20 @tuanphan thank you so much, it works perfectly! 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