Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Modal Window with Local Storage

Features:

  • Toggle Modal: Clicking the "openModalBtn" or "closeModalBtn" will toggle the visibility of the modal window.
  • Click Anywhere to Close: Clicking outside the modal body (but within the modal window) will close the modal.
  • Escape Key Close: Pressing the Escape key will also close the modal.
  • Local Storage Persistence: The modal's visibility state is saved to local storage, so the modal will be in the same state (open or closed) on subsequent visits.

Usage:

  • Include the HTML, CSS, and JavaScript files in your project.
  • Ensure the elements with the following classes exist in your HTML: .openModalBtn .modalContainer .modalBody .closeModalWindow
  • Customize the content and styling as needed.

Technologies:

  • HTML
  • Css
  • JavaScript

About

Simple Modal Window with Local Storage

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages