summaryrefslogtreecommitdiff
path: root/public/collapse.js
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-06-06 20:42:49 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-06-06 20:42:49 +0200
commit02c43e825455a060557e7c31479f8912238e6307 (patch)
tree7ba2707ac2ffbc6f8ede99daba5c2199b0e57d1e /public/collapse.js
parenta31eedef24b0c14aa0898bfa8a5ad949cae58dc3 (diff)
infoscreen: import moreinfo popup
Diffstat (limited to 'public/collapse.js')
-rw-r--r--public/collapse.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/public/collapse.js b/public/collapse.js
new file mode 100644
index 0000000..d38b30a
--- /dev/null
+++ b/public/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');
+ }
+ });
+ });
+ });
+});