Closed MeowningMaster closed 3 years ago
You are misunderstanding how the modals work without JavaScript. The button with the href="#modal-1"
opens the modal using the CSS :target
attribute. In order to close this modal, your close button needs to change the anchor in the URL, so something like this: <a href="#>Close modal</a>
. A modal opened using JavaScript can be closed with JavaScript. I would recommend reading this part of the docs: https://www.gethalfmoon.com/docs/modal/#javascript-usage
I will go ahead and close this. Please re-open it if you think the issue is not resolved.
ok, thanks
Sorry for my english
There is modal with id="modal-1" and button with href="#modal-1". So if you open modal with button you can't close it with halfmoon.toggleModal('modal-1')