From: Anthony Talarico Date: Mon, 28 Dec 2015 17:55:06 +0000 (-0500) Subject: Added top level checkbox filter X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d7093a132c877e225a3374ed378785fee3d32162;p=WP-Themes%2Fmichsci.git Added top level checkbox filter --- diff --git a/js/app.js b/js/app.js index 05a95df..93d434c 100644 --- a/js/app.js +++ b/js/app.js @@ -75,5 +75,10 @@ $(document).ready(function () { return $(this).css('clear') == 'both'; }).remove(); - + $("#tagBox :checkbox").click(function() { + $(".product").hide(); + $("#tagBox :checkbox:checked").each(function() { + $("." + $(this).val()).show(); + }); + }); }); diff --git a/js/custom/upcp.js b/js/custom/upcp.js index aaaa512..580bb85 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -55,5 +55,10 @@ $(document).ready(function () { return $(this).css('clear') == 'both'; }).remove(); - + $("#tagBox :checkbox").click(function() { + $(".product").hide(); + $("#tagBox :checkbox:checked").each(function() { + $("." + $(this).val()).show(); + }); + }); }); diff --git a/page.php b/page.php index 41cd904..a76cbc6 100644 --- a/page.php +++ b/page.php @@ -20,10 +20,11 @@
+

- +
diff --git a/parts/sidebar-l.php b/parts/sidebar-l.php index 4603da4..9af51fb 100644 --- a/parts/sidebar-l.php +++ b/parts/sidebar-l.php @@ -5,13 +5,16 @@

Tags

false + "hide_empty"=> false, + "hierarchical"=>true, + "parent"=>0 ); - $tags = get_terms("michsci_tag", $args); - foreach($tags as $tag){ - echo '' . " " . $tag->name . "
"; + $tags = get_terms("michsci_category", $args); + + foreach($tags as $tag){ + echo '' . " " . $tag->name . "
"; } ?> - +