NazariyM
11/23/2018 - 1:59 AM

Modal API

window.Modal = {
  reinit: function () {
    new Popups();
  },
  open: function (target) {
    // create button for open only!!
    let modalBtn = $(`[data-popup-target="${target}"]`).popup();
    
    // modalEl.open();
  },
  close: function (target) {
    let modalEl = $(`[data-popup-id="${target}"]`).data('popup');

    modalEl.close();
  }
};