Dnm Posted March 26, 2023 Share Posted March 26, 2023 Hi everyone, so this is riving me crazy and I looked everywhere and no solution worked. So when you have your mobile menu open, you can still scroll in the background. I want to disable this scrolling (only when the mobile menu is open) Any help would be greatly appreciated! Link to comment
tuanphan Posted March 30, 2023 Share Posted March 30, 2023 Hi, Add to Settings > Advanced > Code Injection > Footer <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js"></script> <script> $(document).ready(function() { $(".burger-inner").click(function() { $('html').addClass('html-burger-open'); }); }); </script> <style> html.html-burger-open { overflow: hidden; } </style> 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
Matienn Posted April 24, 2023 Share Posted April 24, 2023 (edited) Hello - I was having the same issue and this code worked for me. But now when I exit the menu scrolling is still disabled. When working in Squarespace after testing the menu in mobile view then exiting the menu and switching to desktop view, scrolling is also disabled. Is there a way to re-enable scrolling once out of the menu? Edited April 24, 2023 by Matienn Missing information Link to comment
tuanphan Posted April 25, 2023 Share Posted April 25, 2023 On 4/24/2023 at 7:53 AM, Matienn said: Hello - I was having the same issue and this code worked for me. But now when I exit the menu scrolling is still disabled. When working in Squarespace after testing the menu in mobile view then exiting the menu and switching to desktop view, scrolling is also disabled. Is there a way to re-enable scrolling once out of the menu? What is your 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
Matienn Posted April 25, 2023 Share Posted April 25, 2023 https://leahpastrana.com Password is: ClientSite!9 Link to comment
tuanphan Posted April 29, 2023 Share Posted April 29, 2023 On 4/26/2023 at 2:22 AM, Matienn said: https://leahpastrana.com Password is: ClientSite!9 Hi, Can you remove the code? I will try testing new 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
Matienn Posted May 5, 2023 Share Posted May 5, 2023 I've removed the code. Sorry for the delay in reply - I was pretty sick. Link to comment
Matienn Posted May 17, 2023 Share Posted May 17, 2023 Hi, I removed the code and am wondering if you had any luck with testing a new code? Thanks! Link to comment
tuanphan Posted May 20, 2023 Share Posted May 20, 2023 On 4/29/2023 at 11:21 AM, tuanphan said: Hi, Can you remove the code? I will try testing new code I just checked & it looks fine now. 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
ghostpep___ Posted January 24 Share Posted January 24 This worked for me, but once I return to the homescreen, it's also unable to scroll. https://heron-bullfrog-pc5e.squarespace.com/ password: justine Link to comment
jpeter Posted January 24 Share Posted January 24 @ghostpep___ Replace this line: $('html').addClass('html-burger-open'); With: $('html').toggleClass('html-burger-open'); tuanphan 1 Full stack developer who loves helping people out with anything web related. If you'd like to support me, buy me a coffee! 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