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

jpeter

Member
  • Content Count

    67
  • Joined

  • Last visited

3 Followers

Recent Profile Visitors

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

  1. @dnmddy Hello there! Increasing the specificity should do the trick, so try replacing the line: var elements = document.querySelectorAll('.event-time-12hr'); with var elements = document.querySelectorAll('.mega-menu-container .event-time-12hr'); This way it only target the times in the mega menu.
  2. Missing an = after the id attribute. Should be: <div id="anchor"> </div>
  3. @Triple8 Get rid of opacity: 1 !important; in the .image-caption-wrapper CSS ruleset and then increase the transition speed from 0.1s to something like 0.5s
  4. Oh ok I see the issue, the content of the mega menu is being dynamically added in using Ajax and on my end it take about 2 seconds for it to load in which is why changing that value to 5000 works. You can probably play around with that value and reduce to like 3000.
  5. @dnmddy Modified the code a bit, try this out: (function () { // Defer running the script in milliseconds. Default is 0. var DEFER_LOADING = 0; if (window.NodeList && !NodeList.prototype.forEach) { NodeList.prototype.forEach = Array.prototype.forEach; } if (document.readyState == 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } if(window.MutationObserver && typeof window.MutationObserver === 'function') { var targetNode = document.querySelector('.mega-menu-container'); if(targetNode) { var
  6. @ChristopherBerman You can use the following code below. HTML Added a cta-button--outline class to the second button to style it different from the default, which is solid I removed the &nbsp; and used CSS margin to space the buttons apart <a class="button cta-button" href="https://www.elevated.no/priser">Se Priser</a> <a class="button cta-button cta-button--outline" href="https://www.elevated.no/tjenester">Kom i gang</a> CSS .button { border: 2px solid #2cd4d9; border-radius: 50px; background: #2cd4d9; display: inline-block;
  7. You can add the following javascript code to handle this: (function () { addPolyfills(); if (document.readyState == 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init() { var imageWrappers = document.querySelectorAll('.image-block-outer-wrapper.layout-caption-overlay-hover'); imageWrappers.forEach(function(wrapper){ wrapper.style.cursor = 'pointer'; }); delegate(document, 'click', '.image-block-outer-wrapper.layout-caption-overlay-hover', function (evt) { var link = evt.target.querySelect
  8. @dnmddy that tells me there may be javascript code for summary blocks that may be running after the code I wrote get's ran. If that's the case, I updated the code to defer when it get's ran after a period of time. I created a DEFER_LOADING variable you can update in the code below. I set it to 500 milliseconds for now. (function () { // Defer loading in milliseconds. var DEFER_LOADING = 500; if (window.NodeList && !NodeList.prototype.forEach) { NodeList.prototype.forEach = Array.prototype.forEach; } if (document.readyState == 'loading') { document.addEventListe
  9. @dnmddy Try adding the code to the Footer rather than the Header. See screenshot:
  10. @Carrian You'll want to add another product variant. Here's an article describing how to do that https://support.squarespace.com/hc/en-us/articles/206540687-Adding-basic-product-variants
  11. @rodri333 You can get away with this using JS, here's the code: (function () { if (window.NodeList && !NodeList.prototype.forEach) { NodeList.prototype.forEach = Array.prototype.forEach; } if (document.readyState == 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init() { var elements = document.querySelectorAll('.event-time-12hr'); if(elements) { elements.forEach(function (el) { var time = el.textContent; el.textContent = time.replace(/^(\d+:\d+\s?(?:A|P)M).*$/, '$1'); });
  12. @veganedge It appears to be working fine. Perhaps you just needed to give the DNS settings time to update. See video below: Nn92lGvCas.mp4
  13. @Ptphotography You can add the following JavaScript and CSS below. Feel free to update the TEXT variable in the JavaScript code to whatever you want: JavaScript (function(document){ // Customize TEXT variable. var TEXT = 'Cart'; /******************************************************************** * DO NOT MODIFY CODE BELOW, unless you know what you're doing. *******************************************************************/ if(document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init(){
  14. @Falconer You can add the JS below. This will treat the text as a clickable. JavaScript (function(document){ if(document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } function init(){ addClosestPolyfill(); delegate(document, 'click', '.gallery-caption-grid-masonry', function(evt){ var item = evt.target.closest('.gallery-masonry-item.has-clickthrough'); if(item) { item.querySelector('a').click(); } }); } function delegate (target, eventName, selector, handler) { target.ad
  15. @Falconer You can try adding the CSS below to the page .gallery-caption-grid-masonry { opacity: 0; z-index: -1; transition: all .2s; position: absolute; top: 50%; transform: translateY(-50%); left: 0; text-align: center; color: #fff; height: 100%; padding: 0; } .gallery-masonry-item:not(.has-clickthrough) .gallery-caption-grid-masonry:before { background-color: rgba(0, 0, 0, 0.4); content: ""; display: block; position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 999; opacity: 0; transition: all .5s; } .gallery-masonry-item.has-cli
×
×
  • Create New...