From: Anthony Talarico Date: Tue, 22 Dec 2015 13:53:03 +0000 (-0500) Subject: added page detection X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=eed2be8234f259a2ee59fff186711b8a568a1ce9;p=WP-Themes%2Fmichsci.git added page detection --- diff --git a/js/app.js b/js/app.js index 0836e04..ed47b90 100644 --- a/js/app.js +++ b/js/app.js @@ -38,9 +38,13 @@ $(document).ready(function () { if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){ $("#productsView").css("display", "inherit"); $("#categoriesView").css("display", "none"); + $("#gridView").css("display", "inherit"); + $("#listView").css("display", "inherit"); + $("#categoriesGridView").css("display", "none"); + $("#categoriesListView").css("display", "none"); } - // navigate back to products page if on product page + // navigate back to products page if on single product page if ((window.location.href.indexOf("products-2/?pagename") >= 0)) { // $("#viewBtns").css("display", "none"); $("#grid").on("click", function (e) { diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 2cf2567..cd8b62d 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -18,9 +18,13 @@ $(document).ready(function () { if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){ $("#productsView").css("display", "inherit"); $("#categoriesView").css("display", "none"); + $("#gridView").css("display", "inherit"); + $("#listView").css("display", "inherit"); + $("#categoriesGridView").css("display", "none"); + $("#categoriesListView").css("display", "none"); } - // navigate back to products page if on product page + // navigate back to products page if on single product page if ((window.location.href.indexOf("products-2/?pagename") >= 0)) { // $("#viewBtns").css("display", "none"); $("#grid").on("click", function (e) {