MWR Posted May 28 Posted May 28 help please! how can I make the button on the top right of the page (which is actually the site's title) scroll back to the top of the page? thank you! site:https://plums-arugula-3xkl.squarespace.com/ Pass: abc123
tuanphan Posted May 30 Posted May 30 I see it already scroll to top when click? 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!)
MWR Posted May 31 Author Posted May 31 right now it reloads the page, but i was hoping for more for of a scroll-to-top effect. like it does on this page when you click the "TOP" button. thanks! 15 hours ago, tuanphan said: I see it already scroll to top when click?
tuanphan Posted June 2 Posted June 2 On 5/31/2024 at 9:03 AM, MWR said: right now it reloads the page, but i was hoping for more for of a scroll-to-top effect. like it does on this page when you click the "TOP" button. thanks! Try this code to bottom of Code Injection > Footer <script> $(document).ready(function(){ $('a#site-title').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!)
MWR Posted June 4 Author Posted June 4 On 6/1/2024 at 11:30 PM, tuanphan said: Try this code to bottom of Code Injection > Footer <script> $(document).ready(function(){ $('a#site-title').attr('href','#'); }); </script> Hi again. thanks for sending that over. I pasted that into the code injection and it doesn't seem to do anything. I've left the code in, but is it possible that there's some other code injection that is cancelling it out? any help would be amazing thank you!
Lesum Posted June 4 Posted June 4 @MWR Hi! In addition to the code @tuanphan provided, add this code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee?
MWR Posted June 4 Author Posted June 4 that seems to have done it! thank you so much!! Lesum and tuanphan 2
WillC Posted November 20 Posted November 20 On 6/4/2024 at 2:52 AM, Lesum said: @MWR Hi! In addition to the code @tuanphan provided, add this code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> Hi @Lesum and @tuanphan, I tried using both bits of code, pasted in Code Injection > Footer, and it worked, scrolling back to the top of page one time, and then not again. Any ideas? I had some text, site name and logo in the footer already linked to reload the home page, so i removed those links to no affect. www.rabih-hage.com Thanks!
tuanphan Posted November 21 Posted November 21 17 hours ago, WillC said: I tried using both bits of code, pasted in Code Injection > Footer, and it worked, scrolling back to the top of page one time, and then not again. Any ideas? I had some text, site name and logo in the footer already linked to reload the home page, so i removed those links to no affect. www.rabih-hage.com Thanks! You mean these? You can use this new code <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script> $(document).ready(function() { $('#block-yui_3_17_2_1_1725539771143_4135, #block-yui_3_17_2_1_1729858790182_6852').on('click', function() { $('html, body').animate({ scrollTop: 0 }, 'slow'); }); }); </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!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment