Hide modal backdrop by default
[plack-app-gruntmaster.git] / js / 10-modal.js
index 1c290ef1252ce3d236f7c4208efd3fd45c4f3704..62cbb271c56b32f0f779d0ca4529814aeadeb9b8 100644 (file)
@@ -1,7 +1,8 @@
-let modal, hiding;
+let modal, backdrop, hiding;
 
 function show_modal () {
        modal.classList.remove('hidden');
+       backdrop.classList.remove('hidden');
        setTimeout(function (){
                document.body.classList.add('modal-open');
        }, 20);
@@ -13,6 +14,7 @@ function hide_modal () {
 
 $(function() {
        modal = $('.modal')[0];
+       backdrop = $('.backdrop')[0];
        $(modal).on('transitionend', el => {
                if(!document.body.classList.contains('modal-open'))
                        modal.classList.add('hidden');
This page took 0.010151 seconds and 4 git commands to generate.