diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-08 15:46:30 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-08 15:46:30 -0500 |
commit | 17ac414d744155d77c729f150115e8fd9e18f285 (patch) | |
tree | de24145810d045b2f3ef53c1e9f6c48c368b351f /assets/js/components | |
parent | ca00b8cf532bd93419e3f4bc46f9dde5caa90eec (diff) |
Improve accordion component
Diffstat (limited to 'assets/js/components')
-rw-r--r-- | assets/js/components/accordion.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/assets/js/components/accordion.js b/assets/js/components/accordion.js index 4588ccc6..f64768b6 100644 --- a/assets/js/components/accordion.js +++ b/assets/js/components/accordion.js @@ -1,8 +1,7 @@ KB.onClick('.accordion-toggle', function(e) { - var section = KB.dom(e.target).parent('.accordion-section'); + var sectionElement = KB.dom(e.target).parent('.accordion-section'); - if (section) { - KB.dom(section).toggleClass('accordion-collapsed'); - KB.dom(KB.dom(section).find('.accordion-content')).toggle(); + if (sectionElement) { + KB.dom(sectionElement).toggleClass('accordion-collapsed'); } }); |