Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
melissa_h

Custom Javascript working in preview but not after launch

Question

Posted (edited)

Site URL: https://www.rgsproductsinc.com/system?type=clvw

I can't find anything online that describes this behavior. (Test URL included for your amusement.)

This page is supposed to load in header text, a descriptive paragraph, a drawing, and a slideshow based on the value passed to the page in the URL. This all runs off JavaScript embedded in the same custom code block as the HTML/CSS. The HTML/CSS is working; the JavaScript only works when I'm logged in and previewing the page. We've tried multiple browsers and I've tried injecting it into the page header, but nothing changes.  (Edit: the "Request a Quote" button is also supposed to launch an email with data on the system chosen; it's not doing anything outside the preview window.)

Is this a SquareSpace thing or something else? We're using DNS redirect from the old site host to point to this one; would that cause this?

Edited by melissa_h
added information about other functions not working

Share this post


Link to post

1 answer to this question

Recommended Posts

  • 0

Do you have a premium account?


Free Squarespace 7.1 Anchor Link and Accordion Plugins available here!

If I replied to one of your questions with code, it was either CSS or jQuery.

To add CSS, go to Design -> Custom CSS

jQuery needs some additional steps. Head here: https://code.jquery.com/ and click on minified, under jQuery 3.x and copy that code into Squarespace.

After you put that code into the code injection section in Squarespace, you can add the code I supplied. The code from me will need <script> added before it and </script> added after it (only for jQuery).

There are two places that you can add the code, one is site wide (adds to all pages). Settings -> Advanced -> Code Injection

The other is for a specific page (adds to one page only). Pages -> Gear Icon next to the page -> Advanced

Share this post


Link to post

Create an account or sign in to comment

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


×
×
  • Create New...