neal_bryant Posted September 8, 2022 Share Posted September 8, 2022 (edited) Hello all, Wondering if somebody can help me with this. I'm looking to create a footer where a list of URLs collapse into an accordion on mobile only. I would like this to work in the same way as how the footer works on squarespace.com. I've found this approach on stack overflow, which appears like it should work, but i'm unsure of how to integrate the jquery portion of the code. I presume it needs to be tweaked in order to work within the header/footer within code injection, but I can't seem to get it working. Also, very happy to look at a different approach if there's something that might be more suitable to a squarespace site. Any advise would really be appreciated. Thanks, Neal Edited September 8, 2022 by neal_bryant paul2009 1 Link to comment
Solution tuanphan Posted September 11, 2022 Solution Share Posted September 11, 2022 You can use Accordion Block, then add this code to Design > Custom CSS to show accordion on Mobile Only /* hide accordion footer on desktop */ @media screen and (min-width:768px) { footer.sections .accordion-block { display: none; } } neal_bryant 1 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
neal_bryant Posted September 12, 2022 Author Share Posted September 12, 2022 Ah yes, that's a good idea @tuanphan Thank you very much for the advice. Have a good week. Link to comment
Margauxmnr Posted February 16, 2023 Share Posted February 16, 2023 Hi, I used your solution for my website and it worked. But then how do you hide the normal footer on mobile ? Because now on the mobile I have both the desktop footer and the accordion... Thank you ! Link to comment
tuanphan Posted February 20, 2023 Share Posted February 20, 2023 On 2/17/2023 at 5:52 AM, Margauxmnr said: Hi, I used your solution for my website and it worked. But then how do you hide the normal footer on mobile ? Because now on the mobile I have both the desktop footer and the accordion... Thank you ! Hi, What is site url? We can check easier 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