1function debounce(func, wait) { 2 var timeout; 3 return function () { 4 clearTimeout(timeout); 5 timeout = setTimeout(func, wait); 6 }; 7} 8 9function ajustarAlturaProdutos() { 10 var productLists = ['.product-list', '.product-list-carousel']; 11 12 productLists.forEach(function (listSelector) { 13 $(listSelector).each(function () { 14 var productList = $(this); 15 var maxAltura = 0; 16 17 productList.find('.product-thumb').css('height', 'auto'); 18 19 productList.find('.product-thumb').each(function () { 20 var alturaAtual = $(this).outerHeight(); 21 if (alturaAtual > maxAltura) { 22 maxAltura = alturaAtual; 23 } 24 }); 25 26 productList.find('.product-thumb').css('height', maxAltura); 27 }); 28 }); 29} 30 31 32 33$(window).on("resize", debounce(function () { 34 ajustarAlturaProdutos(); 35}, 100)); 36 37$(window).on('load', function() { 38 ajustarAlturaProdutos(); 39}) 40 41$(document).ready(function () { 42 // Product List 43 $("#list-view").click(function () { 44 setProductLayout('list'); 45 localStorage.setItem("display", "list"); 46 }); 47 48 // Product Grid 49 $("#grid-view").click(function () { 50 setProductLayout('grid'); 51 localStorage.setItem("display", "grid"); 52 }); 53 54 if (localStorage.getItem("display") == "list") { 55 $("#list-view").trigger("click"); 56 setProductLayout('list'); 57 } else { 58 $("#grid-view").trigger("click"); 59 setProductLayout('grid'); 60 } 61}); 62 63function setProductLayout(type){ 64 switch (type) { 65 case 'list': 66 $("#grid-view").removeClass("active"); 67 $("#list-view").addClass("active"); 68 $(".product-layout").attr('class', 'product-layout col-lg-12 product-list mb-4'); 69 break; 70 71 case 'grid': 72 $("#list-view").removeClass("active"); 73 $("#grid-view").addClass("active"); 74 $(".product-layout").attr('class', 'product-layout col-6 col-lg-3 product-grid'); 75 break; 76 } 77} 78 79$(document).ready(function(){ 80 var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) 81 var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { 82 return new bootstrap.Tooltip(tooltipTriggerEl) 83 }) 84})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.