Widget:ToggleWidth: Difference between revisions

From The Midnight Wiki
No edit summary
No edit summary
Line 1: Line 1:
<html>
<body>
<button onclick="myFunction()">Try it</button>
<button onclick="myFunction()">Try it</button>
<script>
<script>
Line 12: Line 10:
}
}
</script>
</script>
</body>
</html>

Revision as of 13:22, 5 July 2023

<button onclick="myFunction()">Try it</button> <script> function myFunction() {

 var x = document.getElementsByClassName("ts-inner");
 if (x.style.maxWidth === "none") {
   x.style.maxWidth = "115em !important";
 } else {
   x.style.maxWidth = "none !important";
 }

} </script>