Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
4.1 kB
2
Indexable
.eg-title-contianter {
    color: #000;
    text-align: center;
    font-size: 29px;
    font-style: normal;
    font-weight: 700;
    line-height: 35px;
    margin-bottom: 30px;
}


.eg-accordion-que {
    color: #000;
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px; /* 150% */
    /* padding:15px; */
    max-width: 750px;
    margin: 0 auto;
    /* padding-bottom: 0; */
    position: relative;
}


.eg-accordion-ans {
    padding: 5px 0px;
    /* border-bottom: 1px solid black; */
    max-width: 750px;
    margin: 0 auto;
}


.eg-accordion-que:after {
    content: '\002B';
    color: #000;
    font-weight: 300;
    float: right;
    margin-left: 5px;
    font-size: 25px;
    line-height: 25px;
    position: absolute;
    right: 0;
}

.eg-accordion-que.active:after {
        content: "\00D7";
    color: #000;
}

.product-grid-container.row.related-products.border-top {
    display: none;
}

.rte__table-wrapper {
    display: none;
}

.eg-accordian-container {
    margin-bottom: 60px;
}
@media only screen and (max-width: 767px) {
    .eg-accordion-que,
    .eg-accordion-ans {
        padding: 0 18px;
    }
    .eg-accordion-que:after{
        top: 2px;
    }
}

(function () {
  var debug = 0;
  var variation_name = "";
  if (window.location.href.indexOf('qa-debug=true') > -1) {
    debug = 1;
  }
    try {
      function waitForElement(selector, trigger, delayInterval, delayTimeout) {
        var interval = setInterval(function () {
          if (
            document &&
            document.querySelector(selector) &&
            document.querySelectorAll(selector).length > 0
          ) {
            clearInterval(interval);
            trigger();
          }
        }, delayInterval);
        setTimeout(function () {
          clearInterval(interval);
        }, delayTimeout);
      }
      var htmlString =''+ 
      '  <div class="eg-accordian-container">'+ 
      '      <div class="eg-inner-container">'+ 
      '          <div class="eg-title-contianter">'+ 
      '        Questions Fréquentes & Réponses'+ 
      '          </div>'+ 
      '          <hr></hr><div class="eg-accordion-que"> Puis-je laver mon SweetPlaid en machine ?</div>'+ 
      '          <div class="eg-accordion-ans">'+ 
      '              <p>  Oui, évidemment le SweetPlaid est lavable en machine<span>&nbsp;à l\'eau froide, séchez séparément à basse température.<br></span></p>'+ 
      '          </div><hr></hr>'+ 
      '          <div class="eg-accordion-que"> Le SweetPlaid passe-t-il au sèche linge ?</div>'+ 
      '          <div class="eg-accordion-ans">'+ 
      '              <p> Nous déconseillons l\'usage d\'un sèche linge.</p>'+ 
      '          </div><hr></hr>'+ 
      '          <div class="eg-accordion-que"> Quelles sont les dimensions du SweetPlaid ?</div>'+ 
      '          <div class="eg-accordion-ans">'+ 
      '              <p>Environ 85 cm de longueur et 75 cm de largeur, ci-dessous les mesures exactes. </p>'+ 
      '          </div> <hr></hr>'+ 
      '      </div>'+ 
      '  </div>';


      function initdesktop() {
        if(debug){
          console.log('Inside init Function');
        
        }
        document.querySelector('#shopify-section-product-template').insertAdjacentHTML('afterend', htmlString);
        var acc = document.querySelectorAll(".eg-accordion-que");
var i;
for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}
      }
      waitForElement(".floating_cart + .row.rte", initdesktop, 50, 15000);
    } 
    catch (e) {
      if (debug) console.log(e, "error in Test" + variation_name);
    }
})();