Jump to content

MatthewCraig

Circle Member
  • Posts

    8
  • Joined

  • Last visited

Posts posted by MatthewCraig

  1. Site URL: https://www.myrtlefieldhouse.com

    I have encountered a problem where I have two different blogs which I want to have different image ratios for. However when I update the image ratio on one blog it also changes it for the other.

    https://www.myrtlefieldhouse.com/david-gooding-answers - This one should be 'Ultra Widescreen'.

    https://www.myrtlefieldhouse.com/online-books - This one should be 'Square'.

    Why are these linked?

  2. Site URL: https://www.mh316.org/hidden-bible-studes/the-god-of-new-beginnings

    Password: myrtlefield

    Hey, as you can see on my page I have implemented the markdown accordion feature. Within this markdown I want to implement this code: https://www.w3schools.com/howto/howto_css_display_element_hover.asp.

    However, when I place it within the Markdown box, the 'hidden' text appears as seen and in a different position (below the heading). Why is this?
    Thanks

  3. 40 minutes ago, bangank36 said:

    You may want to place the code to footer of the code injection?

    Hey, I've tried putting the code in all available areas: Header, Footer, Blog Header, Blog Specific and the load order happens the same each time. It always tries to load the full Markdown Accordion before it loads the image.

    Any reason why the 'defer' tag would stop the script running at all?

  4. Site URL: https://www.mh316.org/bible-studies/the-god-of-new-beginnings

    Pass: myrtlefield

    I asked a question about slow loading images, but no response. I think I figured the issue is my accordion script. It seems that when it is active, SQ loads the Markdown Accordion box before the image at the top of my page. This makes it look like the page is very slow. However, if I add 'defer async' to the Custom Code JavaScript, the Accordion function doesn't load at all!

    Working code with slow image load:

    <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 h1').addClass('ui-closed').css('cursor','pointer');
        $(".markdown-block .sqs-block-content h1").nextUntil("h1").slideToggle();
        $(".markdown-block .sqs-block-content h1").click(function() {
          
          $(this).nextUntil("h1").slideToggle();
          $(this).toggleClass('ui-closed ui-open');
          });
        });

    Not working code with fast image load:

    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" defer async></script>

    <script>
        $(document).ready(function(){
        $('.markdown-block .sqs-block-content h1').addClass('ui-closed').css('cursor','pointer');
        $(".markdown-block .sqs-block-content h1").nextUntil("h1").slideToggle();
        $(".markdown-block .sqs-block-content h1").click(function() {
          
          $(this).nextUntil("h1").slideToggle();
          $(this).toggleClass('ui-closed ui-open');
          });
        });

×
×
  • 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.