Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
jacauschi23

Markdown block with drop-down text - page load issues

Question

Posted (edited)

I have markdown blocks on multiple pages that utilize dropdown sections upon selection. For example, you click a title and then all the text for that title drops down, click the title again and all the text closes up.

However, every time I am going to the page, before the page is fully loaded (for 1s), you can see all the drop-down text displayed. The drop-down text then closes up and becomes hidden once the page is fully loaded. How to resolve this issue? i.e., how to ensure the drop-down text is hidden from the start?

Below is the embedded script code on each page that utilizes these dropdown sections.


<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>


Edited by jacauschi23

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...