A quick little example of using JavaScript buttons to toggle section visibility for HTML pages.
Live demo:
- https://johnkerl.org/jko-toggler
- https://johnkerl.org/jko-toggler?lorem
- https://johnkerl.org/jko-toggler?all
See index.html
in this repo for example usage:
- Name the divs you want to be expandable
- Set up a button for each one
- Include
jko-toggler.js
at the end of the HTML body