Trishyeah Posted November 12, 2020 Posted November 12, 2020 Hi folks, I have code that allows me to create FAQ dropdowns on my site, however it does expand like the accordian on one page, but not the other, but I believe it's the exact same code! I have this code on 2 different pages on my site https://chromatical.com.au/faq and https://chromatical.com.au/chromatical-club (it's a long page and it's nearer the bottom end - just search FAQ) The code I'm using involves the code inside the markdown, and also code that gets hidden in the bottom of each page. The code works as required on the FAQ page - (The boxes open and close when clicked to reveal the answers to the questions) However on the second page, the boxes do not expand and I can't figure out why as I didn't do anything different. Hope someone can help!
Beyondspace Posted November 12, 2020 Posted November 12, 2020 Try to replace the code in your footer with this $(document).on("click", '.markdown-block h4', function() { $(this).toggleClass('open').children('*:not(h4)').slideToggle(); }); BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 12, 2020 Author Posted November 12, 2020 5 minutes ago, bangank36 said: Try to replace the code in your footer with this $(document).on("click", '.markdown-block h4', function() { $(this).toggleClass('open').children('*:not(h4)').slideToggle(); }); Gday! Thanks heaps, I'll give it a go. Should I do this on both pages considering it's the same code? Just in case the other page breaks too?
Beyondspace Posted November 12, 2020 Posted November 12, 2020 1 minute ago, Trishyeah said: Gday! Thanks heaps, I'll give it a go. Should I do this on both pages considering it's the same code? Just in case the other page breaks too? Both page is good, let's update this markdown to use this from now on, but it still need you to add to see if it work BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 12, 2020 Author Posted November 12, 2020 Hmm no still not working on my end 😞 This is my full code! <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function () { $(document).on("click", '.markdown-block h4', function() { $(this).toggleClass('open').children('*:not(h4)').slideToggle(); }); }); </script> <style> body:not(.sqs-edit-mode) .markdown-block h4 { display: block !important; cursor: pointer; } body:not(.sqs-edit-mode) .markdown-block h4 + blockquote { display: none; } body:not(.sqs-edit-mode) h4.open + blockquote { display: block; } body:not(.sqs-edit-mode) .markdown-block blockquote { margin-left: 0; margin-right: 0; } .markdown-block h4 { background: #fdeef3; padding: 10px; margin-top: 0 !important; margin-bottom: 0 !important; border-bottom: 1px solid #000000; } .markdown-block h4 + blockquote { background: #fdeef3; margin-top: 0; padding: 20px; } </style>
Beyondspace Posted November 12, 2020 Posted November 12, 2020 That's weird, you can invite me as collaborator to fix issue directly bangank36@gmail.com BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 12, 2020 Author Posted November 12, 2020 3 hours ago, bangank36 said: That's weird, you can invite me as collaborator to fix issue directly bangank36@gmail.com 4 hours ago, bangank36 said: Try to replace the code in your footer with this $(document).on("click", '.markdown-block h4', function() { $(this).toggleClass('open').children('*:not(h4)').slideToggle(); }); Gday! Thanks heaps, I'll give it a go. Should I do this on both pages considering it's the same code? Just in case the other page breaks too? 3 hours ago, bangank36 said: That's weird, you can invite me as collaborator to fix issue directly bangank36@gmail.com Heya I just added you as a contributor thank you SO SO SO much! We are talking in another issue as well which you might be able to look at while you're in there (if that's okay). It's this issue - https://forum.squarespace.com/topic/173734-code-only-sometimes-displays-correctly/#comment-410135
Beyondspace Posted November 12, 2020 Posted November 12, 2020 1 hour ago, Trishyeah said: Gday! Thanks heaps, I'll give it a go. Should I do this on both pages considering it's the same code? Just in case the other page breaks too? Heya I just added you as a contributor thank you SO SO SO much! We are talking in another issue as well which you might be able to look at while you're in there (if that's okay). It's this issue - https://forum.squarespace.com/topic/173734-code-only-sometimes-displays-correctly/#comment-410135 There is a duplication script on "HOW CAN YOU JOIN?" section, I removed and it worked BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Beyondspace Posted November 12, 2020 Posted November 12, 2020 1 hour ago, Trishyeah said: Gday! Thanks heaps, I'll give it a go. Should I do this on both pages considering it's the same code? Just in case the other page breaks too? Heya I just added you as a contributor thank you SO SO SO much! We are talking in another issue as well which you might be able to look at while you're in there (if that's okay). It's this issue - https://forum.squarespace.com/topic/173734-code-only-sometimes-displays-correctly/#comment-410135 The second issue happen once or twice but I can't find the root cause I placed the stylesheet directly in section, hope that help BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 12, 2020 Author Posted November 12, 2020 11 hours ago, bangank36 said: There is a duplication script on "HOW CAN YOU JOIN?" section, I removed and it worked @bangank36Oh no, it's still not working for me on mobile or desktop :(:( The FAQ doesn't expand/close still but still works correctly on the other page. So strange!
Trishyeah Posted November 12, 2020 Author Posted November 12, 2020 11 hours ago, bangank36 said: The second issue happen once or twice but I can't find the root cause I placed the stylesheet directly in section, hope that help @bangank36 Also, (I commented above about the FAQ not working) But also, thank you SO much for your help with the weird section! I mentioned there were two pages with this issue, this is the other one https://chromatical.com.au/chromatical-club (right down the bottom) is there any chance you could put the stylesheet there as well? Thank you SO very much for your time I'm mighty grateful.
Beyondspace Posted November 13, 2020 Posted November 13, 2020 1 hour ago, Trishyeah said: @bangank36Oh no, it's still not working for me on mobile or desktop :(:( The FAQ doesn't expand/close still but still works correctly on the other page. So strange! IT's been working here, I just record a video BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 13, 2020 Author Posted November 13, 2020 11 minutes ago, bangank36 said: IT's been working here, I just record a video Hmm! Are you able to check on mobile? It is now working for me on desktop, but not on Chrome or Safari on iphone
Beyondspace Posted November 13, 2020 Posted November 13, 2020 Try ti clear browser cache BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 13, 2020 Author Posted November 13, 2020 3 minutes ago, bangank36 said: Try ti clear browser cache OH YAY ITS WORKING THANK YOU SO MUCH AGAIN!!!! Last question... did you get my message about the weird disappearing boxes that you added code for one one page? Hoping you could add it to the other page? Thank you again.
Beyondspace Posted November 13, 2020 Posted November 13, 2020 added on https://chromatical.com.au/chromatical-club ( where is other page BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Trishyeah Posted November 13, 2020 Author Posted November 13, 2020 12 minutes ago, bangank36 said: added on https://chromatical.com.au/chromatical-club ( where is other page Yay it was that page and https://chromatical.com.au/chromatical-packages
Beyondspace Posted November 13, 2020 Posted November 13, 2020 2 minutes ago, Trishyeah said: Yay it was that page and https://chromatical.com.au/chromatical-packages place it there, if issue persist, you can post another topic some other designer may help BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
Recommended Posts
Archived
This topic is now archived and is closed to further replies.