Skip to content

Instantly share code, notes, and snippets.

View Mikhail-Zakharov's full-sized avatar

Mikhail-Zakharov

View GitHub Profile
@Mikhail-Zakharov
Mikhail-Zakharov / Collapse_categories.js
Created August 25, 2012 12:51
Zendesk categories collapse widget
function HideCategory(id)
{
$j("div#category_" + id).hide();
$j.cookie('hide_category_' + id, 'yes', { expires: 180 });
$j('span#hide_category_' + id).attr("onclick", "ShowCategory(" + id + ")");
$j('span#hide_category_' + id).text("[+]");
};
function ShowCategory(id) {
@Mikhail-Zakharov
Mikhail-Zakharov / Collapse categories_Ver2.js
Last active December 28, 2015 20:28
Zendesk categories collapse widget
function HideCategory(id, IsAgent) {
// Function hides category
$j("div#category_" + id).hide('blind');
SetDownArrow(id, IsAgent);
$j.cookie('hide_category_' + id, 'yes', { expires: 180 });
$j("div#category_header_" + id).attr("onclick", "ShowCategory(" + id + "," +IsAgent+ ")");
};