soundslikezeezy Posted October 22, 2019 Share Posted October 22, 2019 Hello! I have been googling my heart out trying to find a solution. I have the Avenue template and have some content for visitors to toggle and I used markdown and in the page header code injection i have: <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').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> It works when I click on the refresh button but not if I go to the page itself from another tab. I have to hit refresh in order for it the content to be hidden. It does the same on mobile. What am I missing? Do you need any other info from me? The page in question: https://www.brightsideup.org/find-child-care Thank you all in advance. Link to comment
brandon Posted October 22, 2019 Share Posted October 22, 2019 Hi there. The issue has to do with AJAX loading. You can disable it, or you can edit your code to take AJAX loading into account. I hope this helps. -Brandon If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
soundslikezeezy Posted October 22, 2019 Author Share Posted October 22, 2019 brandon, thank you! I disabled it and it worked! Thank you so much! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.