communities: Copy code from integrations to toggle_categories_dropdown.

This is used on mobile widths to toggle categories dropdown.
This commit is contained in:
Aman Agrawal 2023-10-06 14:07:40 +00:00 committed by Tim Abbott
parent 7c0edf356c
commit 9d6dcb9a9d
1 changed files with 9 additions and 0 deletions

View File

@ -14,10 +14,19 @@ function sync_open_organizations_page_with_current_hash(): void {
}
}
function toggle_categories_dropdown(): void {
const $dropdown_list = $(".integration-categories-dropdown .dropdown-list");
$dropdown_list.slideToggle(250);
}
// init
$(() => {
sync_open_organizations_page_with_current_hash();
$(window).on("hashchange", () => {
sync_open_organizations_page_with_current_hash();
});
$(".integration-categories-dropdown .dropdown-toggle").on("click", () => {
toggle_categories_dropdown();
});
});