|
|
Line 498: |
Line 498: |
| </div> | | </div> |
| | | |
− | <script>
| |
− | /* When the user clicks on the button,
| |
− | toggle between hiding and showing the dropdown content */
| |
− |
| |
− |
| |
− | function myFunction1() {
| |
− |
| |
− | document.getElementById("myDropdown1").classList.toggle("show");
| |
− | }
| |
− |
| |
− | function myFunction2() {
| |
− |
| |
− | document.getElementById("myDropdown2").classList.toggle("show");
| |
− | }
| |
− |
| |
− |
| |
− | // Close the dropdown if the user clicks outside of it
| |
− | window.onclick = function(event) {
| |
− | if (!event.target.matches('.dropbtn')) {
| |
− |
| |
− | var dropdowns = document.getElementsByClassName("dropdown-content");
| |
− | var i;
| |
− | for (i = 0; i < dropdowns.length; i++) {
| |
− | var openDropdown = dropdowns[i];
| |
− | if (openDropdown.classList.contains('show')) {
| |
− | openDropdown.classList.remove('show');
| |
− | }
| |
− | }
| |
− | }
| |
− | }
| |
− | </script>
| |
| | | |
| </body> | | </body> |
| | | |
| </html> | | </html> |
Revision as of 19:18, 28 May 2017
Our wiki is currently under construction, please bear with us while we make it functional