Jump to content

heyawaiszahid

Circle Member
  • Posts

    37
  • Joined

  • Last visited

1 Follower

Personal Information

Recent Profile Visitors

164 profile views
  1. Hi @jpomilio Please be courteous and mark it as the answer if it helped. This will also assist others who are looking for a similar solution.
  2. Hi @saltcreativestudio_ Please be courteous and mark it as the answer if it helped. This will also help others who are looking for a similar solution.
  3. For those reading this post on a later date, below is the updated code that works flawlessly. <script> let donateBtn = document.createElement("button"); donateBtn.setAttribute("type", "button"); donateBtn.setAttribute("data-formId", "14580"); donateBtn.style.display = "none"; document.body.appendChild(donateBtn); let handleClick = (e) => (e.preventDefault(), donateBtn.click()); document.querySelector(".header-menu-cta a")?.addEventListener("click", handleClick); document.querySelector(".header-actions-action a")?.addEventListener("click", handleClick); document.querySelector("#block-yui_3_17_2_1_1718382999031_11811 a")?.addEventListener("click", handleClick); </script>
  4. @amacarv Please check the DM I just sent.
  5. You are welcome @amacarv Please make sure header menu CTA is not turned off.
  6. You are welcome @amacarv Please add below code to Custom CSS. #block-yui_3_17_2_1_1718382999031_11811 button { width: 100% }
  7. @saltcreativestudio_ Can you check in a private browser window or after clearing your browser cache. It is working for me.
  8. @amacarv I added few lines of code at the bottom for the button in footer. Please use the updated code. <script> let donateBtn = document.createElement("button"); donateBtn.setAttribute("type", "button"); donateBtn.setAttribute("data-formId", "14580"); donateBtn.className = "btn btn--border theme-btn--primary-inverse sqs-button-element--primary"; donateBtn.textContent = "Donate"; let desktopCTA = document.querySelector(".header-actions-action a"); if (desktopCTA) desktopCTA.parentNode.replaceChild(donateBtn.cloneNode(true), desktopCTA); let mobileCTA = document.querySelector(".header-menu-cta a"); if (mobileCTA) mobileCTA.parentNode.replaceChild(donateBtn, mobileCTA); let footerCTA = document.querySelector("#block-yui_3_17_2_1_1718382999031_11811 a"); if (footerCTA) { donateBtn.className = "sqs-block-button-element--large sqs-button-element--secondary sqs-block-button-element"; footerCTA.parentNode.replaceChild(donateBtn, footerCTA); } </script>
  9. You can do the same for the Home link. Pass the id of the header or logo in the URL followed by a slash. This will scroll the page to the position of respective element.
  10. @saltcreativestudio_ Below is the code you need. Make sure to put it at the bottom of your Custom CSS. .item-pagination-link--next { .item-pagination-title { font-size: 0; &:before { content: "Next"; font-size: calc((var(--portfolio-item-pagination-font-font-size-value) - 1) * 1.2vw + 1rem); } } } .item-pagination-link--prev { .item-pagination-title { font-size: 0; &:before { content: "Previous"; font-size: calc((var(--portfolio-item-pagination-font-font-size-value) - 1) * 1.2vw + 1rem); } } }
  11. Hi @amacarv we cannot add code-block into the site header. Therefore, we'll create the button using custom JavaScript and integrate it into the header. Since you already have button there, I replaced it with the one we need, ensuring to retain the existing Squarespace classes and remove other styles. Below is the code that you should place in the Code Injection FOOTER. Hopefully, this helps! <script> let donateBtn = document.createElement("button"); donateBtn.setAttribute("type", "button"); donateBtn.setAttribute("data-formId", "14580"); donateBtn.className = "btn btn--border theme-btn--primary-inverse sqs-button-element--primary"; donateBtn.textContent = "Donate"; let desktopCTA = document.querySelector(".header-actions-action a"); if (desktopCTA) desktopCTA.parentNode.replaceChild(donateBtn.cloneNode(true), desktopCTA); let mobileCTA = document.querySelector(".header-menu-cta a"); if (mobileCTA) mobileCTA.parentNode.replaceChild(donateBtn, mobileCTA); </script>
  12. @JamestownStudio Please share the URL of your website.
  13. @jpomilio Use slash / before the hash #. For example /#who-we-are
  14. @undefined I'm glad it helped. Since we don't currently have another linked image on the homepage, it's okay to exclude all homepage links. However, this approach won't work if you plan to add a few image links to the homepage later on. There are a few solutions to that as well, but let's not complicate a simple thing when it's not necessary.
×
×
  • 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.