Template:ToggleWidth: Difference between revisions

Template page
No edit summary
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<html>
<html>
<head>
<a id="mylink" href="http://www.google.com">linky</a>
<style>
#myDIV {
  width: 100%;
  padding: 50px 0;
  text-align: center;
  background-color: lightblue;
  margin-top: 20px;
}
</style>
</head>
<body>
 
<button onclick="myFunction()">Try it</button>
 
 
 
 
<script>
function myFunction() {
  var x = document.getElementsByClassName('ts-inner');
  if (x.style.max-width === "none") {
    x.style.max-width = "115em";
  } else {
    x.style.max-width = "none";
  }
}
</script>
 
</body>
</html>
</html>

Latest revision as of 22:33, 11 July 2023