Demo
Open your browser's developer tools and watch the console to see what code is
running. I.e. global scope, popstate, or pushState.
Also check out the actual JavaScript for the full details.
Welcome to the modal
Try the following things to test out the user experience.
- Press the Escape key to close the modal.
- Click on the backdrop behind the modal to close the modal.
- Click the X at the top right of the modal to close it.
- Refresh the page and see that the modal stays open.
- Click your browser's back button to close the modal and then the click the browser's forward button to reopen the modal.
- Click the following link to go to a different page and then click your browser's back button to return here and see that the modal is open.