From 8a18b71dfe574db146b430a2f0b225c36f4be4ad Mon Sep 17 00:00:00 2001 From: Joost Agterhoek Date: Tue, 18 Feb 2025 22:32:59 +0100 Subject: [PATCH] still have to completely figure out and centralize the currently working JavaScript --- static/javascript.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 static/javascript.js diff --git a/static/javascript.js b/static/javascript.js new file mode 100644 index 0000000..73cdfca --- /dev/null +++ b/static/javascript.js @@ -0,0 +1,12 @@ +$(function() { + $("td[colspan=7]").find("p").hide(); + $("table").click(function(event) { + event.stopPropagation(); + var $target = $(event.target); + if ( $target.closest("td").attr("colspan") > 1 ) { + $target.slideUp(); + } else { + $target.closest("tr").next().find("p").slideToggle(); + } + }); +});