Template:ToggleWidth: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<html>
<a id="mylink" href="http://www.google.com">linky</a>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
  var x = document.getElementsByClassName("ts-inner");
  for (i in x) {
  if (x[i].style.maxWidth === "none") {
    x[i].style.maxWidth = "115em";
  } else {
    x[i].style.maxWidth = "none";
  }
}
}
</script>
</html>

Revision as of 21:33, 11 July 2023

<a id="mylink" href="http://www.google.com">linky</a>