1 2function equalheight_uiux2025(container) { 3 var currentTallest = 0, 4 currentRowStart = 0, 5 rowDivs = [], 6 $el, 7 topPosition = 0; 8 9 $(container).each(function () { 10 $el = $(this); 11 $el.height('auto'); 12 topPosition = $el.offset().top; 13 14 if (currentRowStart !== topPosition) { 15 // set all heights for the completed row 16 for (let i = 0; i < rowDivs.length; i++) { 17 rowDivs[i].height(currentTallest); 18 } 19 // reset for new row 20 rowDivs = [$el]; 21 currentRowStart = topPosition; 22 currentTallest = $el.height(); 23 } else { 24 rowDivs.push($el); 25 currentTallest = Math.max(currentTallest, $el.height()); 26 } 27 }); 28 29 // apply heights for the last row 30 for (let i = 0; i < rowDivs.length; i++) { 31 rowDivs[i].height(currentTallest); 32 } 33} 34 35const ProductequalheightElements = () => { 36 equalheight_uiux2025(".ss-product-box .best_seller_product"); 37 equalheight_uiux2025(".ss-product-box .ss-product-debug-sales"); 38 39 equalheight_uiux2025(".ss-product-box .ss-product-rating-box"); 40 equalheight_uiux2025(".ss-product-box .ss-product-type"); 41 equalheight_uiux2025(".ss-product-box .ss-product-box-title"); 42 equalheight_uiux2025(".ss-product-box .per-tag"); 43 equalheight_uiux2025(".ss-product-box .ss-product-price"); 44 45 equalheight_uiux2025(".ss-product-box .ss-product-content-item-content"); 46} 47 48 49$(window).on("load", function (e) { 50 setTimeout(function () { 51 if ($(window).width() >= 767) { 52 ProductequalheightElements(); 53 } 54 equalheight_uiux2025(".department_grid .department_products_title a"); 55 }, 100); 56 57}); 58$(window).on("resize", function (f) { 59 if ($(window).width() >= 767) { 60 ProductequalheightElements(); 61 } 62 equalheight_uiux2025(".department_grid .department_products_title a"); 63}); 64 65$(document).ready(function (e) { 66 if ($(window).width() >= 767) { 67 ProductequalheightElements(); 68 } 69 equalheight_uiux2025(".department_grid .department_products_title a"); 70});
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.