Difference between revisions of "Template:BIMATOX Project"

Line 6: Line 6:
 
toggle between hiding and showing the dropdown content */
 
toggle between hiding and showing the dropdown content */
 
function myFunction(id) {
 
function myFunction(id) {
        var dropdowns = document.getElementsByCLassName("dropdown-content");
 
                var i;
 
                for (i = 0; i < dropdowns.length; i++) {
 
                        var openDropdown = dropdowns[i];
 
                        if ( dropdowns[i] != document.getElementById(id) ) {
 
                                openDropdown.classList.remove('show');
 
                        }
 
                }
 
 
document.getElementById(id).classList.toggle("show");
 
document.getElementById(id).classList.toggle("show");
 
}
 
}

Revision as of 22:42, 27 October 2017