From: Anthony Talarico Date: Wed, 13 Jan 2016 16:55:01 +0000 (-0500) Subject: testing cookie for subcat X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=fb123f54c314fe4e16a405b4dcac6d7aa8b8641d;p=WP-Themes%2Fmichsci.git testing cookie for subcat --- diff --git a/js/app.js b/js/app.js index 2beed85..5e384d4 100644 --- a/js/app.js +++ b/js/app.js @@ -24,6 +24,9 @@ $(document).ready(function () { function createCookie(name, value) { var date = new Date(); + if(name === "subcat"){ + date.setTime(date.getTime()+(10*1000)); + } date.setTime(date.getTime()+(3*1000)); var expires = "; expires="+date.toGMTString(); document.cookie = name+"="+value+expires+"; path=/"; @@ -58,7 +61,6 @@ $(document).ready(function () { }); } - // hide product display initially if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){ $("#productsView").css("display", "inherit"); diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 6d38d5b..4fa3054 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -4,6 +4,9 @@ $(document).ready(function () { function createCookie(name, value) { var date = new Date(); + if(name === "subcat"){ + date.setTime(date.getTime()+(10*1000)); + } date.setTime(date.getTime()+(3*1000)); var expires = "; expires="+date.toGMTString(); document.cookie = name+"="+value+expires+"; path=/"; @@ -38,7 +41,6 @@ $(document).ready(function () { }); } - // hide product display initially if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){ $("#productsView").css("display", "inherit");