Template:Expand All
Jump to navigation
Jump to search
<button onclick="expand()">Expand all</button> <button onclick="collapse()">Collapse all</button> <script> function collapse() {
var x = document.getElementsByClassName("mw-collapsible-text"); var i; for (i = 0; i < x.length; i++) { if ( x[i].innerHTML == mw.message( 'collapsible-collapse' ).plain() ) { x[i].click(); } }
} function expand() {
var x = document.getElementsByClassName("mw-collapsible-text"); var i; for (i = 0; i < x.length; i++) { if ( x[i].innerHTML == mw.message( 'collapsible-expand' ).plain() ) { x[i].click(); } }
} </script>