const $ = require('jquery') module.exports = function () { let click = 0 $('body').on('click', '*[data-modal]', (e) => { e.preventDefault() e.stopPropagation() ++click window.setTimeout(() => { if (click !== 1) { click = 0 return } click = 0 let container = $('#modal-container') const body = $('body') if (!container.length) { container = $('