-let modal, backdrop, hiding;
+let modal, hiding;
function show_modal () {
modal.classList.remove('hidden');
- backdrop.classList.remove('hidden');
+ q('.backdrop').classList.remove('hidden');
setTimeout(function (){
document.body.classList.add('modal-open');
}, 20);
$(function() {
modal = q('.modal');
- backdrop = q('.backdrop');
$(modal).on('transitionend', el => {
if(!document.body.classList.contains('modal-open'))
modal.classList.add('hidden');