diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-05-07 11:49:04 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-05-07 11:49:04 +0200 |
commit | a772bb7fef43421ed18a52b1cb1d7bd010e3cf93 (patch) | |
tree | b8c35bc012c61497c53e2e4112dae613f0c8d0cb /public/collapse.js | |
parent | 2b795a4e87db14ca9e4e631e461171285db0d8b2 (diff) |
clean template: show moreinfo using javascript
Diffstat (limited to 'public/collapse.js')
-rw-r--r-- | public/collapse.js | 22 |
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'); + } + }); + }); + }); +}); |