testing cookie for subcat
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 13 Jan 2016 16:55:01 +0000 (11:55 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 13 Jan 2016 16:55:01 +0000 (11:55 -0500)
js/app.js
js/custom/upcp.js

index 2beed85..5e384d4 100644 (file)
--- 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");
index 6d38d5b..4fa3054 100644 (file)
@@ -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");