summaryrefslogtreecommitdiff
path: root/public/static/collapse.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-03-14 11:11:57 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-03-14 11:11:57 +0100
commitecdb462bbfc5393056b66d41b9a502d334bf5415 (patch)
tree3099604024273eaea796fc4a7c9c5a5b424753ea /public/static/collapse.js
parentf94b43035028313e57876fb51a59870c1d2548ee (diff)
move css/js into static subdirectory to allow easy static serving
Diffstat (limited to 'public/static/collapse.js')
-rw-r--r--public/static/collapse.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/public/static/collapse.js b/public/static/collapse.js
new file mode 100644
index 0000000..d38b30a
--- /dev/null
+++ b/public/static/collapse.js
@@ -0,0 +1,22 @@
+$(document).ready(function() {
+ $('div.displayclean > ul > li').each(function() {
+ $(this).click(function() {
+ $(this).children('.moreinfo').each(function() {
+ if ($(this).hasClass('expanded-moreinfo')) {
+ $(this).removeClass('expanded-moreinfo');
+ $(this).addClass('collapsed-moreinfo');
+ }
+ else {
+ $('.moreinfo').each(function() {
+ if ($(this).hasClass('expanded-moreinfo')) {
+ $(this).removeClass('expanded-moreinfo');
+ $(this).addClass('collapsed-moreinfo');
+ }
+ });
+ $(this).removeClass('collapsed-moreinfo');
+ $(this).addClass('expanded-moreinfo');
+ }
+ });
+ });
+ });
+});