Current Path : /var/www/www-root/data/www/info.monolith-realty.ru/local/templates/monolitsochi/js/ |
Current File : /var/www/www-root/data/www/info.monolith-realty.ru/local/templates/monolitsochi/js/skuAction.min.js |
!function(){this.SkuItemProps=function(){};const ready=function(callback){"loading"!==document.readyState?callback():document.addEventListener("DOMContentLoaded",callback)};console.log(333);const clickHandler=function(){const $skuContainer=document.querySelector(".sku-props");$skuContainer&&$skuContainer.addEventListener("click",(function(e){const $item=e.target.closest(".sku-props__value");if(!$item)return;if($item.classList.contains("sku-props__value--active"))return;console.dir(this.querySelectorAll(".sku-props__js-size")),this.querySelectorAll(".sku-props__js-size").forEach((function(element){element.innerHTML="—",element.closest(".sku-props__item").classList.add("sku-props--no-current")})),this.querySelectorAll(".sku-props__value").forEach((function(element){element.classList.remove("sku-props__value--active")})),$item.classList.add("sku-props__value--active");const $parentItem=$item.closest(".sku-props__item");$parentItem.classList.remove("sku-props--no-current");const $titleGroupItem=$parentItem.querySelector(".sku-props__js-size");$titleGroupItem&&($titleGroupItem.textContent=$item.dataset.title)}))};ready(clickHandler)}(); //# sourceMappingURL=skuAction.min.js.map