X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F10-modal.js;h=9bf83ce71f634aad3bfb124fcba63962edb6a782;hb=d2e32e3f90e858eb9865198216e1c960bc52a56a;hp=1c290ef1252ce3d236f7c4208efd3fd45c4f3704;hpb=8345760abf4953980a85e0d5f9cade421f73d4ff;p=plack-app-gruntmaster.git diff --git a/js/10-modal.js b/js/10-modal.js index 1c290ef..9bf83ce 100644 --- a/js/10-modal.js +++ b/js/10-modal.js @@ -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); @@ -12,7 +13,10 @@ function hide_modal () { } $(function() { + if(window.innerWidth < 768) + return; modal = $('.modal')[0]; + backdrop = $('.backdrop')[0]; $(modal).on('transitionend', el => { if(!document.body.classList.contains('modal-open')) modal.classList.add('hidden');