Untitled
unknown
plain_text
2 years ago
3.4 kB
3
Indexable
.eg_tooltip{ cursor: pointer; color: #4e616a; margin-left: 4px; margin-bottom: 0px; /* position: relative; */ } .row.tile > .pdp-tile > .attributes > .shipping { position: relative; } .eg_tooltipCont > span{ border: 3px solid #f9f9f9; padding: 10px 10px 5px; background: #ffffff; color: #696158; display: inline-block; } .eg_tooltipCont { position: absolute; top: 0px; left: 0%; z-index: 999; display: none; padding-top: 30px; max-width: 95%; } .eg-tooltip-arrow { content: ''; position: absolute; width:20px; left: 35%; height:20px; background: #fff; top: 21px; rotate: 45deg; border: 3px solid #f9f9f9; border-right: none; border-bottom: none; z-index: 999; } .eg_content { display: flex; position: relative; margin-top: 0px; margin-left: 27px; } .shipping hr + p { margin-bottom: 1px; } @media screen and (min-width: 1101px){ .eg_tooltip:hover .eg_tooltipCont{ display: block; } } @media screen and (max-width: 1100px){ .eg_tooltip.eg-active .eg_tooltipCont { display: block; } } (function () { try { /* main variables */ var debug = 0; var variation_name = ""; /* all Pure helper functions */ 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); } /* Variation functions */ var egStr =''+ ' <div class="eg_content"> Easy returns.'+ ' <p class="eg_tooltip">Learn More.'+ ' <span class="eg_tooltipCont"><span>We want you to love everything you purchase from us - candles, fragrances, home accents, and anything else. If for any reason you don\'t, even if you just change your mind, start our self-service return process or simply return your item to any of our'+ ' Yankee Candle stores for a full refund or exchange.'+ ' <a href="https://www.yankeecandle.com/on/demandware.store/Sites-homefragranceus-Site/en_US/Support-Show?cfid=ordering-information#faq-ques-ans-question"><b>Click here for more info</b></a><span class="eg-tooltip-arrow"></span>'+ ' </span></span>'+ ' </p>'+ ' </div>'; function init() { document.querySelector("#maincontent > div.container.product-detail.product-wrapper.user-selected > div.row.tile > div.pdp-tile > div.attributes > div.shipping > p").insertAdjacentHTML("afterend", egStr); document.querySelector('div.shipping .eg_content .eg_tooltip').addEventListener('click',function(){ this.classList.toggle('eg-active'); }); } /* Initialize variation */ waitForElement("#maincontent > div.container.product-detail.product-wrapper.user-selected > div.row.tile > div.pdp-tile > div.attributes > div.shipping", init, 50, 15000); } catch (e) { if (debug) console.log(e, "error in Test" + variation_name); } })();
Editor is loading...