diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-03-14 11:17:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-03-14 11:17:46 +0100 |
commit | 8695b61e3787009df59d7fc9a013bb4a1522d630 (patch) | |
tree | 883e260a2fdad1b6f39eefbb9bcd815ac7eb8715 /public/static/collapse.js | |
parent | 5fab5f4516b7c01c7e6b920f9d9f6280275e929d (diff) |
move static files into separate subdirectory for easy static serving
Diffstat (limited to 'public/static/collapse.js')
-rw-r--r-- | public/static/collapse.js | 22 |
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'); + } + }); + }); + }); +}); |