visionsbyfurks Posted April 13, 2022 Share Posted April 13, 2022 (edited) Site URL: http://www.furkhaniqbal.com Hello, I have a piece of code that I've put in the footer injection. I wanted to customise it so the back to top symbol is an outline in grey rather than it being filled. At the moment I've only managed to do this on a hover state rather than normal. I wanted to have this look for normal and when the user hovers, the outline and symbol turns white. <style> #myBtn { width: 40px; height: 40px; display: none; position: fixed; bottom: 20px; right: 20px; z-index: 1; border-style: solid; border-width: 1.5px; font-size: 13px !important; color: #7d7d7d; cursor: pointer; padding: 10px 10px 10px 10px; border-radius: 50%; // Change the hex code in the next line to change background color background-color: #000000; } #myBtn:hover { background-color: #000000; } </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-chevron-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> Edited April 13, 2022 by visionsbyfurks FORGOT CODE Link to comment
Beyondspace Posted April 16, 2022 Share Posted April 16, 2022 On 4/13/2022 at 3:34 PM, visionsbyfurks said: Site URL: http://www.furkhaniqbal.com Hello, I have a piece of code that I've put in the footer injection. I wanted to customise it so the back to top symbol is an outline in grey rather than it being filled. At the moment I've only managed to do this on a hover state rather than normal. I wanted to have this look for normal and when the user hovers, the outline and symbol turns white. <style> #myBtn { width: 40px; height: 40px; display: none; position: fixed; bottom: 20px; right: 20px; z-index: 1; border-style: solid; border-width: 1.5px; font-size: 13px !important; color: #7d7d7d; cursor: pointer; padding: 10px 10px 10px 10px; border-radius: 50%; // Change the hex code in the next line to change background color background-color: #000000; } #myBtn:hover { background-color: #000000; } </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-chevron-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> Try adding #myBtn { background-color: #000000; } Let me know how it works BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Beyondspace Posted April 16, 2022 Share Posted April 16, 2022 My testing BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
visionsbyfurks Posted April 17, 2022 Author Share Posted April 17, 2022 Thank you, it works, do you know how I can have it so that on hover it turns white? @bangank36 Link to comment
Web_Solutions Posted April 17, 2022 Share Posted April 17, 2022 Add there #ffffff Ainul and Create_Job 2 If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks MD Rofik Website Designer and Digital Marketer ☕Am I helpful? Want to offer me a coffee? ✉ Send me a message if needed any help. I'll try to reply as soon as possible. Link to comment
visionsbyfurks Posted April 17, 2022 Author Share Posted April 17, 2022 @Web_Solutions This fills the circle in white. I want the outline circle to highlight white and the chevron icon to turn white Link to comment
tuanphan Posted April 19, 2022 Share Posted April 19, 2022 On 4/17/2022 at 9:27 PM, visionsbyfurks said: This fills the circle in white. I want the outline circle to highlight white and the chevron icon to turn white It looks like you removed back to top. Do you still need help? 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
visionsbyfurks Posted April 19, 2022 Author Share Posted April 19, 2022 Yes please @tuanphan Link to comment
tuanphan Posted April 22, 2022 Share Posted April 22, 2022 On 4/20/2022 at 12:11 AM, visionsbyfurks said: Yes please @tuanphan You can add back to top, then we can check easier. If your site is live & can't add it, try duplicate the site & add there 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