From e70176b6e6f539754974117625eeab06c4c5dd01 Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Tue, 14 Mar 2023 00:23:55 +0200 Subject: main admin and front-end scripts --- html/assets/js/wiki.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 html/assets/js/wiki.js (limited to 'html/assets/js/wiki.js') diff --git a/html/assets/js/wiki.js b/html/assets/js/wiki.js new file mode 100644 index 0000000..b1947f8 --- /dev/null +++ b/html/assets/js/wiki.js @@ -0,0 +1,27 @@ +$(document).ready(function() { + + + /** Categories Menu Toggler + * ------------------------------------------------------------------------- + */ + $('.toggler').click(function(e) { + e.preventDefault(); + + // inner div (contains children of this category) + var inner = $(this).parent().parent().find("ul.inner").first(); + + // toggle 'show' class on/off + if (inner.hasClass('show')) { + inner.removeClass('show'); + inner.slideUp(350); + $(this).html("+"); + } else { + inner.addClass('show'); + inner.slideDown(350); + $(this).html("–"); + } + }); + + + +}); -- cgit v1.2.3