Helenautzon (Talk | contribs) |
Helenautzon (Talk | contribs) |
||
Line 447: | Line 447: | ||
</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> |
Revision as of 02:34, 22 October 2019