From: Anthony Talarico Date: Tue, 19 Jan 2016 20:02:25 +0000 (-0500) Subject: fixing cookie switching on click X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=dc027f62143b6b523be0b1a10c08c6ba71ff9f3a;p=WP-Themes%2Fmichsci.git fixing cookie switching on click --- diff --git a/js/app.js b/js/app.js index 392812b..bd27fdd 100644 --- a/js/app.js +++ b/js/app.js @@ -231,20 +231,16 @@ $(document).ready(function () { if($(".subcat").is(":visible")){ $("#blog-side-info-wrapper").css("display", "none"); } -// $(".subcat").on("click", function() { -// document.cookie ="subcat=blank"; -// }); - -// $("document").ready(function() { -// $(".hitarea").trigger('click'); -// $(".hitarea").click(function(){ -// }); -// }); $(".top-bar").find(".menu-item").find(".sub-menu.dropdown").find(".menu-item").on("click", function () { - - createCookieSubcat("subcat", "subcat"); +// createCookieSubcat("subcat", "subcat"); + document.cookie="subcat=subcat"; + }); + + $("#menu-item-318").children("a").attr("id", "test"); + $("#test").on("click", function (){ +// createCookieSubcat("subcat", "null"); + document.cookie="subcat=null"; }); - if ((window.location.href.indexOf("/?michsci_category") >= 0) || (window.location.href.indexOf("/?pagename") >= 0) ){ var $bottomText = $("#catelog-content").nextAll(); var $bottomText2 = $("#categoriesGridView").nextAll(); diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 6aae07c..e4711fe 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -211,20 +211,16 @@ $(document).ready(function () { if($(".subcat").is(":visible")){ $("#blog-side-info-wrapper").css("display", "none"); } -// $(".subcat").on("click", function() { -// document.cookie ="subcat=blank"; -// }); - -// $("document").ready(function() { -// $(".hitarea").trigger('click'); -// $(".hitarea").click(function(){ -// }); -// }); $(".top-bar").find(".menu-item").find(".sub-menu.dropdown").find(".menu-item").on("click", function () { - - createCookieSubcat("subcat", "subcat"); +// createCookieSubcat("subcat", "subcat"); + document.cookie="subcat=subcat"; + }); + + $("#menu-item-318").children("a").attr("id", "test"); + $("#test").on("click", function (){ +// createCookieSubcat("subcat", "null"); + document.cookie="subcat=null"; }); - if ((window.location.href.indexOf("/?michsci_category") >= 0) || (window.location.href.indexOf("/?pagename") >= 0) ){ var $bottomText = $("#catelog-content").nextAll(); var $bottomText2 = $("#categoriesGridView").nextAll();