Jump to content


  • Posts

  • Joined

  • Last visited

cloecloa's Achievements

  1. Hi, no thank you, decided to use a plug in for the pop up! Hope you had a nice time off
  2. Hey! Thanks for coming back to me, it would to change the whole announcement bar to say "10% off your first order, expires in 24hrs", it would link to a form on the page. Thanks, Chloe
  3. Thanks so much this is showing now! Do you know how to get it to show on mobile as well? I also noticed, when you actually submit your email into the form it closes instantly without the thank you message showing. Is there a way for that message to show and for the pop-up to have an close X in the top right?
  4. Hi @tuanphan Thanks for your help o. this chain. I see at the top you say it is possible to change text and link on the announcement bar on a single page. Are you able to let me know how to do that? URL is here:https://www.howaboutnope.com/np-shop Thank you!
  5. Hi @tuanphan This is exactly what I need, I tried to install this on my website and it hasn't worked. The form has disappeared from the page but no pop-up appears. I have tried setting the squarespace built-in pop-up to show on this page and not to show on this page but the pop-up doesn't appear either way. Would really appreciate your help: URL and Code below: https://www.howaboutnope.com/np-shop <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script> <script> $(document).ready(function() { function handlePopUp() { var popup = $('.form-block'); var isHidePopup = getCookie('coookieIsHidePopup'); if('true'!==isHidePopup){ popup.css('display', 'block'); } // Hide popup when clicking outsite $(document).click(function (e){ if('block' == popup.css('display')) { if (!popup.is(e.target) && popup.has(e.target).length === 0){ hidePopupAndSetCookie( popup, 1 ); } } }); // Hide popup when close or submit $('#close-popup, .newsletter-form-button, header.newsletter-form-header').click(function() { hidePopupAndSetCookie( popup, 1 ); }); } function hidePopupAndSetCookie(popup, time) { popup.hide(); setCookie('coookieIsHidePopup', 'true', 1); } function setCookie(cname, cvalue, exdays) { var now = new Date(); //d.setTime(d.getTime() + (exdays*24*60*60*1000)); //var expires = "expires="+ d.toUTCString(); //window.document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; now.setTime(now.getTime() + 24 * 3600 * 1000); document.cookie = "name=value; expires=" + now.toUTCString() + "; path=/"; } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(window.document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i <ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } handlePopUp(); }); </script> <style> #block-yui_3_17_2_1_1667994634958_6508 { position: fixed; width: 340px; background-color: green; /* newsletter background */ top: 100px; left: 0; right: 0; margin: 0 auto; z-index: 999; display: none; } /* Close icon */ #block-yui_3_17_2_1_1667994634958_6508.newsletter-form-header:before { content: "\e01a"; font-family: 'squarespace-ui-font'; color: white; border: 1px solid white; position: absolute; right: -30px; top: 0; padding: 5px; line-height: 15px; z-index: 20000; cursor: pointer; } </style>
  6. Hi Tuanphan, Thank you so so much for your help! That sorted the bulk buy sections and I can swap out the block-yui code for all other sections. I did try it for the "single bars" section and it doesn't work, from what I see it only has a block- Id. I attached a screenshot because not sure if it is possible in accordion or if I need a different id number?
  7. Hello, thank you for replying! The page I am trying to sort this on is below https://www.howaboutnope.com/shop
  8. Hi all, Thanks so much for posting this, it has been really helpful and fixed my problem also. I have noticed, however that it doesn't work on all the product blocks on the site. I had previously thought it was because some product blocks were in an accordion but I have removed them from this and it is still not working. It works on the top section of product blocks but when these lower down blocks are separated by heading text it stops working. Are you able to help? Thanks, Chloe
  • 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.