Dialog Lightbox as a Modal Demo
These images will open in a lightbox as a modal. Meaning you have to click the close button or hit your escape key on your keyboard.
Setup:
Your HTML markup will not need to change. You will though need to pass modal:
true
to the constructor.
<script>
document.addEventListener("DOMContentLoaded", function() {
let modal = new Dbox({
modal: true
});
modal.run();
});
</script>