waiki Posted May 24, 2022 Share Posted May 24, 2022 Site URL: https://grape-opossum-anjy.squarespace.com/ Hello everyone, at the moment I'm building a new restaurant website for a customer. https://grape-opossum-anjy.squarespace.com/ Password: wiplasepia Is it possible that the floating button on the right side appears after the user starts to scroll down the page? Hope someone has a quick solution for my problem. Thanks in advance 🙂 Best regards Waiki Link to comment
tuanphan Posted May 25, 2022 Share Posted May 25, 2022 Try adding to Last Line in Code Injection > Footer <script> $(document).ready(function () { $(window).scroll(function () { if ($(this).scrollTop() > 200) { $('a.t-button.button2').fadeIn(); } else { $('a.t-button.button2').fadeOut(); } }); }); </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
waiki Posted May 25, 2022 Author Share Posted May 25, 2022 Hi Tuan Phan,  I added your new Code. The button is still visible on the top. If I start scrolling down the page it disappears and if i continue scrolling it is visible again.  And when I scroll back to the top of a page it isn't visible until I start scrolling down again. This effect is what I need when the user is visiting the pages.  Do you know what I mean 🙂 ? Link to comment
tuanphan Posted May 26, 2022 Share Posted May 26, 2022 On 5/25/2022 at 3:37 PM, waiki said: Hi Tuan Phan,  I added your new Code. The button is still visible on the top. If I start scrolling down the page it disappears and if i continue scrolling it is visible again.  And when I scroll back to the top of a page it isn't visible until I start scrolling down again. This effect is what I need when the user is visiting the pages.  Do you know what I mean 🙂 ? It looks fine to me. Did you solve it? 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
waiki Posted May 27, 2022 Author Share Posted May 27, 2022 Unfortunately haven't solved it. The customer didn't like the solution and I removed the Code for the floating button. Sorry that I couldn't test it further with you 🙂 As described above, the effect only works properly if you have scrolled down and then scrolled up again. Link to comment
tuanphan Posted May 29, 2022 Share Posted May 29, 2022 On 5/27/2022 at 2:36 PM, waiki said: Unfortunately haven't solved it. The customer didn't like the solution and I removed the Code for the floating button. Sorry that I couldn't test it further with you 🙂 As described above, the effect only works properly if you have scrolled down and then scrolled up again. You can duplicate the site, add code & share duplicated 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment