Jump to content

code blocks loading in twice on pages

Recommended Posts

Site URL: https://www.sweetmamasauce.com/sweet-mama-hot-sauce

password for the site is: sauce

 

i seem to have an issue with my code blocks loading in twice with the flex animation, not sure how to shut it off on just the text sections as i would still like it for the buttons and images but most of my pages are loading in, then refreshing or loading in again so you see the lazy load feature twice on the headline as the page loads.

 

any ideas on how to fix this without ditching the site wide animation?

Edited by zsawtelle1
typo
Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

sure thing, one page is https://www.sweetmamasauce.com/faq

i have the same base code applied across the site so any code blocks that have text seem to be loading in and then doing a refresh so the sitewide flex animation flashes twice, code in the block is as follows:

<html>
<head>
<style>
#content-desktop {display: block;}
#content-mobile {display: none;}

@media screen and (max-width: 768px) {
#content-desktop {display: none}
#content-mobile {display: block; text-align: center}
}
}
</style>
</head>

<body>
  
<div id="content-desktop">
<h2>
frequently asked questions </h2>

 </div>
  
  <div id="content-mobile">
    <h2>
frequently <br />asked <br />questions</h2>
 
 </div>
 </body>
</html>

Link to comment
On 10/4/2021 at 6:13 AM, zsawtelle1 said:

sure thing, one page is https://www.sweetmamasauce.com/faq

i have the same base code applied across the site so any code blocks that have text seem to be loading in and then doing a refresh so the sitewide flex animation flashes twice, code in the block is as follows:

<html>
<head>
<style>
#content-desktop {display: block;}
#content-mobile {display: none;}

@media screen and (max-width: 768px) {
#content-desktop {display: none}
#content-mobile {display: block; text-align: center}
}
}
</style>
</head>

<body>
  
<div id="content-desktop">
<h2>
frequently asked questions </h2>

 </div>
  
  <div id="content-mobile">
    <h2>
frequently <br />asked <br />questions</h2>
 
 </div>
 </body>
</html>

It looks like you solved? I see fine here.

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

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

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