Guest Posted November 2, 2020 Posted November 2, 2020 Site URL: https://madminiperformance.co.uk Hi, I am trying to have a floating button on the right hand side of my shop. When the user scroll through the products the button shows up to help the user to go back up. Ideally I would like the button to show on the main shop page as well as in categories. Does anyone knows how I can achieve this? See attached picture, excuse the beautiful drawing, white button. Thanks, Damien
Beyondspace Posted November 2, 2020 Posted November 2, 2020 Here is one way Squarespace: How to Add a Back to Top Button (adlyticmarketing.com) You can add this into custom code injection section (instruction) <style> #myBtn { width: 50px; height: 50px; display: none; position: fixed; bottom: 20px; right: 30px; z-index: 99; border: none; outline: none; font-size: 25px !important; color: white; cursor: pointer; padding: 10px 10px 10px 11px; border-radius: 50%; box-shadow: 1px 1px 5px #000; // Change the hex code in the next line to change background color background-color: #a4a4a4; } #myBtn:hover { background-color: #aeaeae; } </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/js/all.min.js" crossorigin="anonymous"></script> <button onclick="topFunction()" id="myBtn" title="Go to top"> <i class="fas fa-arrow-up"></i> </button> <script> window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("myBtn").style.display = "block"; } else { document.getElementById("myBtn").style.display = "none"; } } function topFunction() { $('html,body').animate({ scrollTop: 0 }, 1000); } </script> Insider 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Guest Posted November 2, 2020 Posted November 2, 2020 Sorry bangank36 it says: Missing Opening `{` Can you help?
Beyondspace Posted November 2, 2020 Posted November 2, 2020 11 minutes ago, Damien23 said: Sorry bangank36 it says: Missing Opening `{` Can you help? I am checking BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Beyondspace Posted November 2, 2020 Posted November 2, 2020 Could you show me the issue? I used it on my site and working perfectly BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Beyondspace Posted November 2, 2020 Posted November 2, 2020 1 minute ago, Damien23 said: It's not custom css, per my intruction link above it should be this path Settings -> Advanced -> Code Injection -> footer InelegantlyWaisted 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Guest Posted November 2, 2020 Posted November 2, 2020 Oh I see I was stupid. I will try again thanks 🙂
Beyondspace Posted November 2, 2020 Posted November 2, 2020 8 minutes ago, Damien23 said: Oh I see I was stupid. I will try again thanks 🙂 Check this url, it has stuff you can follow BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Supremo Posted January 15, 2021 Posted January 15, 2021 @bangank36 Hey, the code worked great. May I know how to change the icon, I would like to remove the straight-line in the arrow and only leave with the arrow head. Much appreciated, Supremo Picture attached below would be the reference. Beyondspace 1
Beyondspace Posted January 15, 2021 Posted January 15, 2021 31 minutes ago, Supremo said: @bangank36 Hey, the code worked great. May I know how to change the icon, I would like to remove the straight-line in the arrow and only leave with the arrow head. Much appreciated, Supremo Picture attached below would be the reference. Would you mind to share your site with the code working I can help Supremo 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
DarrenLyons Posted January 15, 2021 Posted January 15, 2021 @bangank36 Is there a way to change the button color, not the shadow or the hover color? TIA Beyondspace 1
Beyondspace Posted January 15, 2021 Posted January 15, 2021 5 minutes ago, DarrenLyons said: @bangank36 Is there a way to change the button color, not the shadow or the hover color? TIA You can replace the hex code here DarrenLyons 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Beyondspace Posted January 16, 2021 Posted January 16, 2021 2 hours ago, Supremo said: @bangank36 thank you. supremo-essential.squarespace.com pw:essentials In the html snippet, change the word 'fa-arrow-up' to 'fa-angle-up' The snippet using this icon from fontawesome Font Awesome Supremo 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Supremo Posted January 16, 2021 Posted January 16, 2021 @bangank36 works like a charm! thanks buddy. Beyondspace 1
InelegantlyWaisted Posted May 16, 2021 Posted May 16, 2021 @bangank36 - this has done the job for me too. Many thanks! Fumbling, slowly and seldom surely, through creating and maintaining my first site. Sufficiently stupid to be starting another at the same time. What could possibly go wrong? 7.1. Current subs to Office 365 (Family) and G Suite (Basic) and still trying to work out which works best with SS for me.
CaDeBr Posted October 21, 2021 Posted October 21, 2021 Is there a setting that you can use to go back to the top of the page you are on? Thks
jclinch Posted April 29, 2022 Posted April 29, 2022 On 11/2/2020 at 8:48 AM, bangank36 said: It's not custom css, per my intruction link above it should be this path Settings -> Advanced -> Code Injection -> footer Hi @bangank36 - Do you know what the code would be if I wanted the button on the bottom left side of my page? I currently have a live chat bubble on the bottom right side, so the two are overlapping. The code worked perfectly, though!
tuanphan Posted May 1, 2022 Posted May 1, 2022 On 4/29/2022 at 9:50 PM, jclinch said: Hi - Do you know what the code would be if I wanted the button on the bottom left side of my page? I currently have a live chat bubble on the bottom right side, so the two are overlapping. The code worked perfectly, though! in the code change right: 30px; to left: 30px; 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!)
Cara2408 Posted May 23, 2022 Posted May 23, 2022 hi @bangank36 how can we make this button ease in transparancy when scrolling down? rather than it just BAM! appear. Thanks 🙂
Beyondspace Posted May 23, 2022 Posted May 23, 2022 1 hour ago, Cara2408 said: hi @bangank36 how can we make this button ease in transparancy when scrolling down? rather than it just BAM! appear. Thanks 🙂 Do you have any sample or screenshots to make your idea clear? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Cara2408 Posted May 23, 2022 Posted May 23, 2022 @bangank36 Id have to screen record, but it's pretty easy to understand. In other words, how to make the button slowly appear (fade in) when it first appears when scrolling down? It is currently immediate
Beyondspace Posted May 23, 2022 Posted May 23, 2022 Can you share your site so I can take a look? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment