From fb123f54c314fe4e16a405b4dcac6d7aa8b8641d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 13 Jan 2016 11:55:01 -0500 Subject: [PATCH] testing cookie for subcat --- js/app.js | 4 +++- js/custom/upcp.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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"); -- 2.17.1