Jump to content

Accordian - page load

Recommended Posts

Hello, I'm having issues with my accordion text default opening when loading the page before closing.

Ideally I'd like it to default close on page load. Any ideas?

Here's the page header code I used:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script><script>
$(document).ready(function(){
$('.markdown-block .sqs-block-content h3').addClass('ui-closed').css('cursor','pointer');
$(".markdown-block .sqs-block-content h3").nextUntil("h3").slideToggle();
$(".markdown-block .sqs-block-content h3").click(function() {

$(this).nextUntil("h3").slideToggle();
$(this).toggleClass('ui-closed ui-open');
});
});
</script>

website: www.tashho.co.uk

password: plantsarecool

Link to comment
  • Replies 2
  • Views 293
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.