location.reload();
});
}
+ // hide product display initially
if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){
$("#productsView").css("display", "inherit");
$("#categoriesView").css("display", "none");
window.location.href = window.location.pathname;
});
}
- // change output view
+ // change output view from list to grid
if (!(window.location.href.indexOf("products-2/?pagename") >= 0)) {
$("#grid").on("click", function (e) {
document.cookie = "view=grid";
return $(this).css('clear') == 'both';
}).remove();
+ // show products if filter is selected else only display categories
$("#tagBox :checkbox").click(function() {
$(".product").hide();
+ $("#gridView").css("display", "inherit");
+ $("#listView").css("display", "inherit");
$("#categoriesGridView").hide();
$("3categoriesListView").hide()
$("#tagBox :checkbox:checked").each(function() {
$("." + $(this).val()).show();
});
+ // hide products on front page, show all products if on products page
if($("#tagBox :checkbox:checked").length === 0){
$(".product").show();
$("#categoriesGridView").show();
$("#categoriesListView").show();
+ $("#gridView").css("display", "none");
+ $("#listView").css("display", "none");
}
});
});
location.reload();
});
}
+ // hide product display initially
if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){
$("#productsView").css("display", "inherit");
$("#categoriesView").css("display", "none");
window.location.href = window.location.pathname;
});
}
- // change output view
+ // change output view from list to grid
if (!(window.location.href.indexOf("products-2/?pagename") >= 0)) {
$("#grid").on("click", function (e) {
document.cookie = "view=grid";
return $(this).css('clear') == 'both';
}).remove();
+ // show products if filter is selected else only display categories
$("#tagBox :checkbox").click(function() {
$(".product").hide();
+ $("#gridView").css("display", "inherit");
+ $("#listView").css("display", "inherit");
$("#categoriesGridView").hide();
$("3categoriesListView").hide()
$("#tagBox :checkbox:checked").each(function() {
$("." + $(this).val()).show();
});
+ // hide products on front page, show all products if on products page
if($("#tagBox :checkbox:checked").length === 0){
$(".product").show();
$("#categoriesGridView").show();
$("#categoriesListView").show();
+ $("#gridView").css("display", "none");
+ $("#listView").css("display", "none");
}
});
});