Line 6: | Line 6: | ||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | ||
− | + | <button onclick="myFunction('Demo1')" class="w3-button w3-block w3-left-align"> | |
− | + | Open Section 1</button> | |
− | <button onclick=" | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | <div id="Demo1" class="w3-container w3-hide"> | ||
+ | <p>Some text..</p> | ||
</div> | </div> | ||
Line 22: | Line 18: | ||
if (x.className.indexOf("w3-show") == -1) { | if (x.className.indexOf("w3-show") == -1) { | ||
x.className += " w3-show"; | x.className += " w3-show"; | ||
− | } else { | + | } else { |
x.className = x.className.replace(" w3-show", ""); | x.className = x.className.replace(" w3-show", ""); | ||
} | } | ||
} | } | ||
− | </script> | + | </script> |
</body> | </body> | ||
</html> | </html> |
Revision as of 16:21, 14 October 2017
Some text..