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

Search the Community

Showing results for tags 'javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Forum
    • News and Announcements
    • Getting Started With Squarespace
    • Coding and Customization
    • Commerce
    • Selling & Scheduling Your Services
    • Feedback on Your Site
    • Images and Videos
    • Pages and Content
    • SEO and Marketing
    • Site Design and Styles
  • Colorado Designers's Topics
  • Squarespace Forum Club Guidelines's Topics
  • Austin, TX Designers's Club Discussion
  • New York City Designers's Club Discussion
  • Berlin Designers's Club Discussion
  • SEO Experts's Club Discussion
  • Photographers's Club Discussion
  • Graphic Designers's Topics
  • London Designers's Topics
  • Podcasters's Club Discussion
  • Custom Coding Help's Club Discussion
  • Atlanta, GA Designers's Topics
  • Seattle, WA Designers's Topics
  • San Diego, CA Designers's Topics
  • Dallas, TX Designers's Topics
  • Australia Designers's Club Discussion
  • Minnesota Designers's Topics
  • Minnesota Designers's Topics
  • Copywriters's Topics
  • France Designers 🇫🇷's Topics
  • France Designers 🇫🇷's Topics
  • Portland, OR Designers's Topics
  • Canadian Website Designers's Club Discussion
  • Los Angeles Designers & Devs's Club Discussion
  • South African Designers's Club Discussion
  • Brazil Designers's Club Discussion
  • Developers's Club Discussion
  • German Circle Members's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Website


Location


Badges


Expert ID

  1. I'm trying to add a JavaScript to a button to bring up a BackerKit pre-order store. An example of what I'm trying to do (though I don't think it's a Squarespace site): top right corner of https://lynqme.com/ With the code provided below from BackerKit in a code block I was able to get things to work with clickable "Pre-order Now" text... <script> (function() { var script = document.createElement('script'); script.src = 'https://backerkit.com/assets/preorders.js'; script.async = true; var entry = document.getElementsByTagName('script')[0]; entry.parentNode.insertBefore(script, entry); })(); </script> <a href="#" data-bk-preorders="https://virtueathletic.backerkit.com/overlay_preorders">Pre-order Now</a> ...and with my own fumbling through additional code I was able to get the text to kind of be a button. <script> (function() { var script = document.createElement('script'); script.src = 'https://backerkit.com/assets/preorders.js'; script.async = true; var entry = document.getElementsByTagName('script')[0]; entry.parentNode.insertBefore(script, entry); })(); </script> <div align="right" class="sqs-block button-block sqs-block-button"> <a href="#" data-bk-preorders="https://virtueathletic.backerkit.com/overlay_preorders" class="sqs-block-button-element—small sqs-block-button-element">Pre-order now</a> </div> Unfortunately I can't get the button to look, function, and align like my regular button blocks (blue/white & white/black on hover) as seen in the attached image (blue button block on top - black JavaScript "button" on bottom.)
  2. I added a bit of matrix text to my homepage. But, I want to slow it down a little. Does anyone know how to do this?
  3. I have a weird issue whenever I try to use the innerHTML function in an embedded block. The function does not seem to work properly when multiple blocks are embedded on the same page. Multiple blocks all display the same image even if the code is different. I don't believe this is a coding issue on my end because if I replace innerHTML with textContent, the data pulls correctly. Anyone else have this issue? Images have been attached for clarity. This is the exact same JS, but one uses getElementByID('element').textContent, and the other uses getElementByID('element').innerHTML You can see that the textcontent pull has different data while the innerHTML returns identical data.
  4. Does anybody know how to do a header like the one on this website? https://timtigner.com/
  5. I am looking for a blog post counter for my website. The blog on my website focuses on cigar reviews and each new post is a new cigar review. I would visitors to know how many cigars have been reviewed on my website in total using a blog post counter or the likes. Is this possible?
  6. Anybody have any idea how to add h2 matrix text to a single page (home page)? Thanks!
  7. Dear Community, I am in the process of making my website Multilingual. For the moment I have set up a test Squarespace website to experiment on, though the implementation on my live website will be the same. Website: http://lychee-sheep-23gt.squarespace.com/ Password: 123456789 Template: Brine I have followed the guide found here https://www.bradgood.net/articles/multi-language-content-on-any-squarespace-template with great success. However, I am stuck on the following: On the mobile / tablet view I would like the Language switcher to appear on the bottom of the mobile menu and not in the header... For reference here is the code I have used so far. CODE INJECTION FOOTER: CUSTOM CSS: Please take note: I am not a coder. I can understand instructions on code and modify them so they work for me.... If somebody could please help me with this, it would honestly make my day! Thanks Max
  8. I'm using Brine. I'm changing my logo image on specific pages by inserting the script below into the page header. However, since this only affects desktop with 'Header-branding-logo', the logo is not getting changed on the mobile versions of these pages. <script> window.onload = function() { document.getElementsByClassName('Header-branding-logo')[0].src = 'URL_TO_IMAGE'; }; </script> How would I add the functionality into this script or just use a new method to change the logo image on both desktop and mobile? Thanks in advance.
  9. Hello there, I have written a javascript with some jQuery to call an api and get some data to be rendered when a user clicks on a specific page. I have put this code inside the header of code injection section. But the problem is the script seems to execute only when user access the site the first time, not when they are accessing that specific page. Can anyone be able to help me out to have a workaround to this problem?
  10. Hi, I am working on a Squarespace store for a winery and need add some features to the checkout page. The customer's order cannot be processed unless it is a multiple of 12. I've been checking out forums for documentation of similar things but I haven't found much involving Squarespace pages. This website has a version of what I need (https://sage-hills-wine.myshopify.com/cart), however, I looked at their code and noticed that the "Order Limits" feature is integrated with Shopify, which I am not using. Does anyone have experience with this involving merely some custom code inserted via Code Injection, or should I be looking into alternative e-commerce software for this level of customization? Thank you
  11. I want to empty out the cart when I press a button. I tried setting the "CART" cookie value to null but that didn't do anything. Any Ideas? Help would be appreciated im using the Brine Template.
  12. Hello! I'm trying to create a javascript function where after a customer adds something to cart, they are sent to the cart. At the moment, they stay on the product page. I created this javascript, and it works to send the customer to the cart. However, the product doesn't appear in the cart right away. It seems like I need a delay to give Squarespace some time to add the product to the cart. I'm hoping to add a 2 or 3 second delay to allow for this. The button says "Adding..." then "Added!", so I'm not concerned about experience. Any help that can be provided would be great! <script> $(function() { var $button = $('.sqs-add-to-cart-button'); $button.on('click', function(){ window.location.href = 'https://www.pamelacardjewelry.com/cart'; }); }); </script>
  13. i have an embedded script on my site's homepage that uses JQuery's ready method to execute a function whenever I load my website. The code executes when I load the homepage the first time. But if I navigate to another page on my site and then come back to the homepage, the function won't execute again. How can I fix this? Here's the code: <div id="api_text"> <script> $().ready(function() { $.get( "https://example_url_api.com/", function(data) { const results = JSON.parse(data.body); let print_string = ""; for (var result_key in results) { const result_string = results[result_key]; $("#api_text").append(result_key + " : "); $("#api_text").append(result_value + "<br/>"); print_string += result_string; } console.log(print_string); } ); }); </script> </div>
  14. Hey guys, This might be a basic problem but I want to enter the code under into the website custom page since it would allow me to collect data from the website into google analytic. However, it keeps saying that the there's a 'SYNTAX ERROR ON LINE 1' and I don't know what is the problem since this a copy that Google Analytic gaved me, I don't think I can remove something. Please help me :)
  15. Hi, I want to ad the linkedin insight tag to my website. I browsed the forum and help guides but didn't find a solution. I don't know if it's possible. Anybody knows how to do that ? Here is a link to faq page on inkedin: https://www.linkedin.com/help/lms/answer/65521/the-linkedin-insight-tag-faqs?lang=en
  16. I've attached a screenshot of the page in question. I wanna make the "Continue: Choose Add-ons" button only clickable if the customer clicked the "Submit Requirements" button above it. I'd like the error message to display "Please submit requirements before continuing". What code should I inject into the header for this to work? Thank you so much!
  17. Hi! I’m using the Brine template (Wav) and trying to customize my the gallery on my page so you can click a button to view thumbnails. I have the button, but I’m stuck on how to show/hide the thumbnail strip. So far, I have added this to the code injection: <script>function myFunction() { var x = document.getElementById("the div"); if (x.style.display === "none") { x.style.display = "block"; } else { x.style.display = "none"; } }</script> and this is the button on the page: <button onclick="myFunction()">Thumbnails</button> <div id="the div"><p> <br> Thumbnails here </p></div> This is the link to the page: https://adrian-merrick-aks4.squarespace.com/becky-copy Any advice would be greatly appreciated!!
  18. Greetings - I'm working on a site and have an embedded calendar... https://kwocv3.squarespace.com/calendar-events ...using this JavaScript that was provided to me... <div id="elvanto-calendar-1740"></div><script src="https://kwoc.elvanto.net/calendar_embed.js?c[]=add651f2-307c-11e5-af42-0673d9c9b5d6&fd=s&el_id=1740"></script> If you notice the events (see Sundays) - when you click on one, you get a pop-up that shows more details. However, I am unable to click on the "close" button. I've checked w/ the provider of this JS, but they said it would be something on SquareSpaces end... Any help would be greatly appreciated! Isaac
  19. I'm working on a site using the Tremont template see here I would like to transfer the mouseover effects of the index-navigation and apply these to the main-nav at the top right of the screen so as when you hover over the menu items they change the background video/image see here. I have achieved a similar effect on other projects but am having difficulty with 1. targeting the background video and 2. placing the images I wish to replace it with. Thanks in advance, any help would be greatly appreciated as I've been battling with this one for too long.
  20. Hi everyone. Hope you can help.I am creating a website for children with fun activities on, based on a dog. The client would like me to feature a button on the home page that when children press, automatically plays the sound of the dog barking. They have put various recordings of this on Soundcloud. So I need to be able to get some code to automate this. Is anyone able to help please?Thank you!Lynne
  21. I've integrated a photography slider for comparing before & afters of construction jobs. It uses the gallery block to create the comparison slider. For some reason though these sliders dont load, and it just shows the two images stacked. If i reload the page sometimes it will work however. It seems very inconsistent, across all browsers and even mobile it'll either work or not. https://www.rebuildex.com/before-and-after Here is the tut I followed to implement the comparison slider: https://www.rebeccagracedesigns.com/plugins Any suggestions or alternatives would be greatly appreciated!
  22. I'm trying to load a group of blocks from one of my pages (/testimonials) into another page using jQuery's .load function (an Ajax method) and then display them with a fadeIn/Out animation to create a slideshow of testimonials on the current page. The load executes but the lines following do not. Here is a snippet of the code that's injected into the page header: $(document).ready( function() { $(".col.sqs-col-12.span-12:has(.sqs-block-quote)").addClass("slideshow"); $(".slideshow").load("/testimonials .col.sqs-col-8.span-8 .sqs-block.quote-block.sqs-block-quote.null"); $(".slideshow > div:gt(0)").hide(); }); The last line, to hide all but the first block, never executes. However, if I paste that line into Chrome's javascript console, it executes as expected. I'm guessing this might have something to do with Ajax but I really have no idea. My site is using a template with Ajax loading enabled - I've tried disabling it but it makes no difference. I have Googled and tried various suggestions but am stumped. Any help would be greatly appreciated!
  23. We implement the Google Tag Manager Code in the header & body, but it doesn't wok. Why?
  24. I need some serious help here... My client has asked me to add a customer login to their third-party payment website. Normally, this would be a simple iframe or embed, but this place gave me code to add to the site. You can see what it looks like at https://thundercitymotorsok.com/login. I've got the visual 100%, but nothing is happening when I click the Login button.......... GRRRRRR I've tried using the third-party helpdesk but they are useless. I'm not a programmer, so this is out of my wheelhouse. The site is on 7.1 and I can't figure out how to disable AJAX in the 7.1 system to see if that's the issue. I've got the HTML, CSS, and script all in their respective spots, I think. I just need to understand what I'm doing wrong or haven't done yet. Is there anyone with some API/Javascript skills who wouldn't mind helping me out with this? I know this isn't really enough info to give me answers, but didn't want to overload my request with details. :-) If there's a programming angel among us who would have pity on me, I'll gladly share whatever deets you need to help me out!!!!!
  25. Hello, Is it possible to upload js files? Thanks a lot in advance,Marinske.
×
×
  • Create New...