Jump to content

Customized a button for my nonprofit page- now API won't show unless I "refresh" page

Recommended Posts

Site URL: https://www.simplythebasics.org/hygienebankdatabase

Hi! I have created two customized buttons on this page  that will take you to two different pages - both pages are embedded with a map and list of members in our membership. (map & members integrated from another site)

When I click on the buttons from the original linked page, the buttons will take me to the desired page but the map & members do not show up until I refresh the page. Once refreshed, then they show up just fine.

Is it my code? Is it Squarespace? One of the 3rd party sites told me to turn off Ajax but I heard that could slow down the site altogether. 

Code shown below & attached is a video of the error.

Thank you!

 

Code:

   <style>
  .button {
  text-align: center;
    color: #96c5a5;
  display:inline-block;
width: 220px;
        margin: 50px;
  height: 220px;
  padding: 20px 20px;
  border-radius: 20px;
  background: #ffffff;
  border: 5px solid #cee7d6;
  cursor: pointer;
    font-size: 15px;
  transition: all 200ms ease;
  box-shadow: rgba(37, 39, 89, 0.08) 0px 8px 8px 0;
  font-family: Poppins;
      }
  .intro{
    color: #565656;
      font-size: 25px;
  }
  .button:hover{
    background: #cee7d6;
    color: #565656!important;
    border: 5px solid #ffffff !important;
  }
    </style>
  </head>
  <body>
  <center>
  <a href="/giving-to-hygiene-banks" class="button"><span class="intro">Would you like to donate Hygiene Supplies?</span><br><br>Locate Community Hygiene Providers in Your Area!<br/></a>
  <a href="/hygiene-search" class="button"><span class="intro">Are you in need of Hygiene Supplies?</span><br><br>Locate Hygiene & Service Providers in your Area!<br/></a>
  </body>
  
    

 

 

Link to comment
  • Replies 4
  • Views 342
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

3 hours ago, SBasics said:

One of the 3rd party sites told me to turn off Ajax but I heard that could slow down the site altogether.

Ajax is designed to improve load times. You have to decide if turning off Ajax is worth your code being able to function.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
Quote

Is disabling Ajax my only option

Short term yes.

Quote

is there a better way to write the code so this doesn't occur?

This is problematic when you are using a library of code. There is no easy way to alter the code.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.