Jump to content

Custom Widget code works ok on Chrome, but not displaying correctly on Safari

Recommended Posts

Hi all,

I've had some help with this code before, but I've added a code widget with the below code.  This displays ok (not great but ok) with Chrome, but with Safari the Drop down lists for the dates Check in and check out don't display.  Sometimes widget hasn't shown at all.  Does anyone have any insight as to why?

<div id="search-widget_IO312PWQ"><script>!function(e,t,a,n,c,r){function s(t){e.console.log("[Guesty Embedded Widget]:",t)}var i,d,l,o,y,m,g,h,p,u;n&&(i=n,d=t.getElementsByTagName("head")[0],(l=t.createElement("link")).rel="stylesheet",l.type="text/css",l.href=i,l.media="all",d.appendChild(l)),o=function(){try{e[a].create(r).catch(function(e){s(e.message)})}catch(e){s(e.message)}},h=!1,y=c,m=function(){h||this.readyState&&"complete"!=this.readyState||(h=!0,o())},(g=t.createElement("script")).type="text/javascript",g.src=y,g.async="true",g.onload=g.onreadystatechange=m,p=g,(u=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,u)}(window,document,"GuestySearchBarWidget","https://s3.amazonaws.com/guesty-frontend-production/search-bar-production.css","https://s3.amazonaws.com/guesty-frontend-production/search-bar-production.js",{"siteUrl":"airpeaceofmind.guestybookings.com","color": "#ed87c6"});</script></div>

the website in question is currently apom.squarespace.com password test


Many thanks

Link to comment
  • Replies 3
  • Views 989
  • Created
  • Last Reply

Hi again

It appears the custom CSS (needed to make the code render properly) is conflicting with the custom code injection.

I've been advised to create a blank HTML page to put the custom code then add a link to it from an embedded URL.

However, try as I might - I can't see how I can add a blank HTML page.

Does anyone have any advice?


Link to comment


This topic is now archived and is closed to further replies.

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