From 04168823a1e6ae9792115f6283fda8f22dd08c29 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 28 Jun 2016 13:43:12 -0400 Subject: [PATCH] testing number of product based width for container --- js/app.js | 9 ++++++++- js/custom/pageSetup.js | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 6a846cb..7acf07e 100644 --- a/js/app.js +++ b/js/app.js @@ -94,5 +94,12 @@ $(document).ready(function () { $(this).css("height", 175).css("width", 'auto'); $(this).css("background", 'url(' + src + ') no-repeat center center').css("background-size", "cover"); $(this).find('img').remove(); - }); + }); + + var products = $(".type-product").length; + console.debug(products); + + if(products > 3){ + $("#container").css("width", "700px"); + } }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index e9b4d24..0ff494c 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -85,5 +85,12 @@ $(document).ready(function () { $(this).css("height", 175).css("width", 'auto'); $(this).css("background", 'url(' + src + ') no-repeat center center').css("background-size", "cover"); $(this).find('img').remove(); - }); + }); + + var products = $(".type-product").length; + console.debug(products); + + if(products > 3){ + $("#container").css("width", "700px"); + } }); -- 2.17.1