David_Ledger Posted April 16, 2021 Share Posted April 16, 2021 Site URL: https://icosahedron-flounder-e9sx.squarespace.com/i-am-new Currently I have a button which links to a Q&A expandable accordion here, approx 2/3rds down the page "What is a dependent?". I would like to have the first answer of the accordion open or expanded as you arrive to the link, instead of the current state which is closed? Any thoughts? THANKS! Site password: 1234What is a dependent?What is a dependent?What is a dependent? Beyondspace 1 Link to comment
Beyondspace Posted April 18, 2021 Share Posted April 18, 2021 On 4/17/2021 at 12:28 AM, David_Ledger said: Site URL: https://icosahedron-flounder-e9sx.squarespace.com/i-am-new Currently I have a button which links to a Q&A expandable accordion here, approx 2/3rds down the page "What is a dependent?". I would like to have the first answer of the accordion open or expanded as you arrive to the link, instead of the current state which is closed? Any thoughts? THANKS! Site password: 1234What is a dependent?What is a dependent?What is a dependent? Modify your code snippet in the header injection and remove the line that toggle the content on page load $(document).ready(function(){ $('.markdown-block .sqs-block-content h4').addClass('ui-closed').css('cursor','pointer'); //$(".markdown-block .sqs-block-content h4").nextUntil("h4").slideToggle(); $(".markdown-block .sqs-block-content h4").click(function() { $(this).nextUntil("h4").slideToggle(); $(this).toggleClass('ui-closed ui-open'); }); }); BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. 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