Widget:ToggleWidth: Difference between revisions

From The Midnight Wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:


<includeonly>
<includeonly>
<html>
<button onclick="myFunction()">Try it</button>
<script>
<script>
function changeWidth() {
function myFunction() {
   var x = document.getElementsByClassName("ts-inner");
   var x = document.getElementsByClassName("ts-inner");
   if (x.style.maxWidth === "none") {
  for (i in x) {
     x.style.maxWidth = "115em !important";
   if (x[i].style.maxWidth === "none") {
     x[i].style.maxWidth = "115em";
   } else {
   } else {
     x.style.maxWidth = "none !important";
     x[i].style.maxWidth = "none";
   }
   }
}
}
}
</script>
</script>
<button onclick="changeWidth()">Try it</button>
</html>
</includeonly>
</includeonly>

Latest revision as of 14:31, 5 July 2023