aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim/webui/static/js')
-rw-r--r--fg21sim/webui/static/js/main.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/fg21sim/webui/static/js/main.js b/fg21sim/webui/static/js/main.js
index 7f5b582..6db99e0 100644
--- a/fg21sim/webui/static/js/main.js
+++ b/fg21sim/webui/static/js/main.js
@@ -83,6 +83,23 @@ $(document).ready(function () {
scrollTarget(nav_height);
});
+ // Toggle section contents/body
+ $(".heading > .toggle").on("click", function () {
+ var toggle = $(this);
+ var body = toggle.closest(".heading").next(".body");
+ if (body.is(":visible")) {
+ body.slideUp("fast");
+ toggle.removeClass("fa-chevron-circle-up")
+ .addClass("fa-chevron-circle-down")
+ .attr("title", "Expand contents");
+ } else {
+ body.slideDown("fast");
+ toggle.removeClass("fa-chevron-circle-down")
+ .addClass("fa-chevron-circle-up")
+ .attr("title", "Collapse contents");
+ }
+ });
+
// Panel toggle control
$(".panel-title > .toggle").on("click", function () {
var toggle = $(this);