Difference between revisions of "Sandbox-Dropdown-Menu"

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

Revision as of 10:07, 13 May 2018