Foto Source Logo
Foto Source Logo

SHOP ONLINE

var productCatalog = '<%= products.length %>'; if (productCatalog == 0) { $(".catalog-filters").css('width','0%'); $(".catalog-filters").hide(); $(".catalog-content").css('width','100%'); } else { $(".catalog-filters").css('width','20%'); $(".catalog-filters").show(); $(".catalog-content").css('width','77%'); }
×
Filters
Clear Filters
<% if (products.length == 0) { %> <% } %>

Filters
Clear Filters
var parent = document.querySelectorAll('.d-catalog-product'); for (let x of parent) { if(x.querySelector('.d-catalog-product-warning-text') !== null) { console.log("True"); } else { console.log("False"); // Create an element: var newNode = document.createElement("div"); newNode.classList.add('d-catalog-product-warning-text'); newNode.style.setProperty("color", "green", "important"); newNode.style.setProperty("border-bottom-color", "green", "important"); // Create a text node: newNode.innerHTML = "In Stock"; // Insert before existing child: const list = x.getElementsByClassName("d-catalog-product-title-container"); list[0].insertAdjacentElement("afterend",newNode); } }
Share by: