%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/projetos/takthua.com.br/wp-content/themes/storefront/assets/js/
Upload File :
Create Path :
Current File : /var/www/projetos/takthua.com.br/wp-content/themes/storefront/assets/js/sticky-add-to-cart.min.js

document.addEventListener("DOMContentLoaded",function(){const t=document.getElementsByClassName("storefront-sticky-add-to-cart");if(t.length&&"undefined"!=typeof storefront_sticky_add_to_cart_params){const e=document.getElementsByClassName(storefront_sticky_add_to_cart_params.trigger_class);if(0<e.length){const n=function(){e[0].getBoundingClientRect().top+e[0].scrollHeight<0?(t[0].classList.add("storefront-sticky-add-to-cart--slideInDown"),t[0].classList.remove("storefront-sticky-add-to-cart--slideOutUp")):t[0].classList.contains("storefront-sticky-add-to-cart--slideInDown")&&(t[0].classList.add("storefront-sticky-add-to-cart--slideOutUp"),t[0].classList.remove("storefront-sticky-add-to-cart--slideInDown"))};n(),window.addEventListener("scroll",function(){n()});let s=null;if(document.body.classList.forEach(function(t){"postid-"===t.substring(0,7)&&(s=t.replace(/[^0-9]/g,""))}),s){const o=document.getElementById("product-"+s);if(o&&!o.classList.contains("product-type-simple")&&!o.classList.contains("product-type-external")){const c=document.getElementsByClassName("storefront-sticky-add-to-cart__content-button");c[0].addEventListener("click",function(t){t.preventDefault(),document.getElementById("product-"+s).scrollIntoView()})}}}}});

Zerion Mini Shell 1.0