Difference between revisions of "Sandbox-Dropdown-Menu"

Line 1: Line 1:
 
<html>
 
<html>
 +
<script>
 
var dropdown = document.querySelector('.dropdown');
 
var dropdown = document.querySelector('.dropdown');
 
dropdown.addEventListener('click', function(event) {
 
dropdown.addEventListener('click', function(event) {
Line 5: Line 6:
 
   dropdown.classList.toggle('is-active');
 
   dropdown.classList.toggle('is-active');
 
});
 
});
 +
</script>
 
     <section class="section tot">
 
     <section class="section tot">
 
       <div class="container">
 
       <div class="container">

Revision as of 10:06, 13 May 2018