From: Anthony Talarico Date: Tue, 28 Jun 2016 17:43:12 +0000 (-0400) Subject: testing number of product based width for container X-Git-Tag: v1.0.0^2~112 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=04168823a1e6ae9792115f6283fda8f22dd08c29;p=WP-Themes%2Ffrancejourneys.git testing number of product based width for container --- 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"); + } });