Jump to content

WaiWeb

Member
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. It appears the recommendation is to use an alternative method than cookies in Squarespace using localStorage.getItem and localStorage.setItem: <script> document.addEventListener("DOMContentLoaded", function() { // Check if the user is verified var variablename = localStorage.getItem('variablename'); if (!variablename) { // If not verified //DO SOME STUFF document.getElementById('yesButton').addEventListener('click', function() { localStorage.setItem('variablename', 'true'); document.body.removeChild(popup); }); } }); </script>
  2. Hi there. I wish to add Javascript to my website to create and set a cookie when a button is pressed. The button and other actions are in place, but I note that when I add the cookie code in Squarespace , it is not recognised; I have tried both of the following but the Console tool in Google Chrome reports $.cookie and Cookies.set as unknown terms/functions: $.cookie('over18cookie', 'over18', {expires: 7}); Cookies.set('over18cookie', 'over18', { expires: 7, path: '/' }); Is there an accepted means of implementing custom cookies in Squarespace please?
  3. I would suggest we all contact SqSp to advise directly of this issue: https://support.squarespace.com/hc/en-us/requests/new
  4. Apparently changes to a "Major Form Block Update" have stuffed up customised form code injection. I am experiencing the same issue. I built a form YESTERDAY and it worked fine. Today, not so much... JQuery on.('change') actions have no effect, not even a code error in Google Chrome console window. It's also affecting the CSS, although for the most part I have been able to fix that. Even the "placeholder" text has disappeared - that's part of SquareSpace's own system - I mean, wtf? Similar lack of support from Live Chat, "we don't support this". Very disappointing. Another pre-existing form I made months ago for a separate site is also not working. I have tried to take the code back to basics to minimise room for error and reliance of #IDs, etc but still no joy. Very, VERY frustrating and is going to cripple my customers' forms - i.e. people can't contact them anymore. If anyone has any ideas I would be keen to know! For reference, here's the code that's not working; pretty basic JQuery! $(document).ready(function(){ $('select').on('change', function() { //do some stuff }); }); </script> See this post:
  5. I am experiencing the same issue. I built a form YESTERDAY and it worked fine. Today, not so much... JQuery on.('change') actions have no effect, not even a code error in Google Chrome console window. It's also affecting the CSS, although for the most part I have been able to fix that. Even the "placeholder" text has disappeared - that's part of SquareSpace's own system - I mean, wtf? Similar lack of support from Live Chat, "we don't support this". Very disappointing. Another pre-existing form I made months ago for a separate site is also not working. I have tried to take the code back to basics to minimise room for error and reliance of #IDs, etc but still no joy. Very, VERY frustrating and is going to cripple my customers' forms - i.e. people can't contact them anymore. If anyone has any ideas I would be keen to know! For reference, here's the code that's not working; pretty basic JQuery! $(document).ready(function(){ $('select').on('change', function() { //do some stuff }); }); </script>
×
×
  • 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.