David_Ledger Posted April 16, 2021 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 Posted April 18, 2021 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 - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
Recommended Posts
Archived
This topic is now archived and is closed to further replies.