Helenautzon (Talk | contribs) |
Helenautzon (Talk | contribs) |
||
Line 318: | Line 318: | ||
</div></div> | </div></div> | ||
+ | <script> | ||
+ | |||
+ | |||
+ | var coll = document.getElementsByClassName("collapsiblebig"); | ||
+ | var i; | ||
+ | |||
+ | for (i = 0; i < coll.length; i++) { | ||
+ | coll[i].addEventListener("click", function() { | ||
+ | |||
+ | this.classList.toggle("coactivebleu"); | ||
+ | var content = this.nextElementSibling; | ||
+ | if (content.style.maxHeight){ | ||
+ | content.style.maxHeight = null; | ||
+ | } else { | ||
+ | content.style.maxHeight = content.scrollHeight + "px"; | ||
+ | } | ||
+ | }); | ||
+ | } | ||
+ | </script> | ||
</html> | </html> |
Latest revision as of 02:33, 22 October 2019