Ashelle Posted April 19, 2021 Share Posted April 19, 2021 Site URL: http://www.myartbeatflorals.com I recently watched a tutorial on how to create a collapsible/accordion FAQ page. Worked great...except I just discovered it does not appear as collapsible when I visit my website as a visitor would...on desktop or mobile. In edit/dashboard mode, it works as it should. Here is the code I used: <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(document).ready(function(){ $('.markdown-block .sqs-block-content h3').css('cursor','pointer'); $(".markdown-block .sqs-block-content h3").nextUntil("h3").slideToggle(); $(".markdown-block .sqs-block-content h3").click(function() {$(this).nextUntil("h3").slideToggle();}); }); </script> And a portion of the customized markdown code I used: ### **HOW LONG WILL IT TAKE FOR MY FLOWERS TO BE MADE?** While this depends on how many items you order, I typically request a minimum of 8 weeks to complete your flowers. My calendar always fills up quickly each month, so the earlier you book, the better! <hr> ### **HOW FAR IN ADVANCE CAN I ORDER MY FLOWERS?** Everything I create is either wood, silk, fabric, dried, or naturally preserved. This means you can order several months in advance without worrying about wilting or decay! Just keep the flowers in a dry, cool place out of moisture and direct sunlight, and your arrangements can last for years! <hr> Link to comment
Agha_Waqas Posted April 19, 2021 Share Posted April 19, 2021 8 hours ago, Ashelle said: Site URL: http://www.myartbeatflorals.com I recently watched a tutorial on how to create a collapsible/accordion FAQ page. Worked great...except I just discovered it does not appear as collapsible when I visit my website as a visitor would...on desktop or mobile. In edit/dashboard mode, it works as it should. Here is the code I used: <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script> $(document).ready(function(){ $('.markdown-block .sqs-block-content h3').css('cursor','pointer'); $(".markdown-block .sqs-block-content h3").nextUntil("h3").slideToggle(); $(".markdown-block .sqs-block-content h3").click(function() {$(this).nextUntil("h3").slideToggle();}); }); </script> And a portion of the customized markdown code I used: ### **HOW LONG WILL IT TAKE FOR MY FLOWERS TO BE MADE?** While this depends on how many items you order, I typically request a minimum of 8 weeks to complete your flowers. My calendar always fills up quickly each month, so the earlier you book, the better! <hr> ### **HOW FAR IN ADVANCE CAN I ORDER MY FLOWERS?** Everything I create is either wood, silk, fabric, dried, or naturally preserved. This means you can order several months in advance without worrying about wilting or decay! Just keep the flowers in a dry, cool place out of moisture and direct sunlight, and your arrangements can last for years! <hr> Hi. I just reviewed your website and it working Link to comment
Solution creedon Posted April 20, 2021 Solution Share Posted April 20, 2021 The first time I loaded the page there was no collapsing going on. The second time I loaded the page I could see the collapsing effect. I wonder if this is yet another case of the curse of Ajax Loading. Could you try turning off Ajax Loading to see if the problem goes away? tuanphan 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
Ashelle Posted May 7, 2021 Author Share Posted May 7, 2021 @creedon that worked, thanks! creedon 1 Link to comment
tuanphan Posted May 9, 2021 Share Posted May 9, 2021 On 5/7/2021 at 7:06 AM, Ashelle said: @creedon that worked, thanks! I see the site has some small problems. Do you want to fix these? Site URL – https://www.myartbeatflorals.com/ 1. (Tablet-About) Increase this content width? 2. (Tablet-Gallery) Increase page content width? 3. (Tablet-FAQ) Increase page width? 4. (Tablet-Contact) Want to stacked image/text? 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
Ashelle Posted May 10, 2021 Author Share Posted May 10, 2021 On 5/9/2021 at 5:18 AM, tuanphan said: I see the site has some small problems. Do you want to fix these? Sure, if you can give me the exact codes lol. It takes me forever to find the right coding, and I've kinda let the tablet view go by the wayside. Link to comment
tuanphan Posted May 12, 2021 Share Posted May 12, 2021 On 5/11/2021 at 2:50 AM, Ashelle said: Add to Design > Custom CSS /* Tablet issues */ @media screen and (max-width:900px) and (min-width:641px) { /* about */ section#abouttheowner .span-8 { width: 90% !important; } section#abouttheowner .row:nth-child(3)>.span-2 { width: 5%; } /* gallery */ div#page-5f985ef048d47c0f1b88d8ff .span-4 { width: 100%; } /* faq */ div#page-5f99ecafc45d762a233943c0 .span-6 { width: 80%; } div#page-5f99ecafc45d762a233943c0 .span-3 { width: 10%; } /* contact */ div#page-5f9b27cc4b9fdf5da3b9bb13>.row>.span-6 { width: 100%; } } 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
Ashelle Posted May 12, 2021 Author Share Posted May 12, 2021 5 hours ago, tuanphan said: Add to Design > Custom CSS I pasted all that and it didn't seem to change anything. Link to comment
tuanphan Posted May 14, 2021 Share Posted May 14, 2021 On 5/12/2021 at 10:36 PM, Ashelle said: I pasted all that and it didn't seem to change anything. Remove above & add this to Settings > Advanced > code Injection > header <style> /* Tablet issues */ @media screen and (max-width:900px) and (min-width:641px) { /* about */ section#abouttheowner .span-8 { width: 90% !important; } section#abouttheowner .row:nth-child(3)>.span-2 { width: 5%; } /* gallery */ div#page-5f985ef048d47c0f1b88d8ff .span-4 { width: 100%; } /* faq */ div#page-5f99ecafc45d762a233943c0 .span-6 { width: 80%; } div#page-5f99ecafc45d762a233943c0 .span-3 { width: 10%; } /* contact */ div#page-5f9b27cc4b9fdf5da3b9bb13>.row>.span-6 { width: 100%; } } </style> 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
Ashelle Posted May 14, 2021 Author Share Posted May 14, 2021 9 hours ago, tuanphan said: Remove above & add this to Settings > Advanced > code Injection > header Perfect! Thanks so much! Link to comment
Amaya_SQSP Posted February 11, 2022 Share Posted February 11, 2022 Hi @Ashelle, I see that you may have used some custom code to try to create an accordion on your site and it caused some unexpected issues. I see that they may have been fixed. For future reference, I'm happy to say it is now possible to add an accordion to your site without additional code using the accordion block! We have some information about the possibilities and customizations of the accordion block in our guide "Accordion blocks" should you want to take a look. 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