| Line 1: | Line 1: | ||
<html> | <html> | ||
| + | var dropdown = document.querySelector('.dropdown'); | ||
| + | dropdown.addEventListener('click', function(event) { | ||
| + | event.stopPropagation(); | ||
| + | dropdown.classList.toggle('is-active'); | ||
| + | }); | ||
<section class="section tot"> | <section class="section tot"> | ||
<div class="container"> | <div class="container"> | ||
var dropdown = document.querySelector('.dropdown');
dropdown.addEventListener('click', function(event) {
event.stopPropagation();
dropdown.classList.toggle('is-active');
});
You can insert any type of content within the dropdown menu. You simply need to use a
<div> instead.
This is a link