Į viršų
class Modal { constructor() { this.modal = document.querySelector(.js-custom-modal) } open() { this.modal.style.display = 'initial' } close() { this.modal.style.display = 'none' } } const openBtn = document.querySelector(".js-open-modal-link") const closeBtn = document.querySelector(".js-close-modal-link") openBtn.addEventListener('click', function (event) { modal.open() }) closeBtn.addEventListener('click', function (event) { modal.close() })