dropdown_button_module

This is a module to create dynamic dropdown buttons in browsers.

Usage no npm install needed!

<script type="module">
  import dropdownButtonModule from 'https://cdn.skypack.dev/dropdown_button_module';
</script>

README

Dropdown Button Module

This is a simple module which adds an event listener to the browser document which shows any dropdown content when a dropdown button is clicked.

In order to use this, ensure that:

  • your HTML dropdown button has a class of "dropbtn".
  • a div with a class "dropdown-content" directly after the "dropbtn".
  • both the above elements are wrapped in an outer div with class "dropdown".