A modal is usually displayed with a blurred background on the whole page.
You can add an event listener on this background and if you click on it, you close the modal.
Excuse me guys if I am using like this function function toggleselver(modalId) {
const modal = document.getElementById(modalId);
if (modal) {
modal.classList.toggle('hidden');
}
} to toggle modal showing and hide I need also when I clicking outside the form will be hidden just if its visible How to customize that.
..Best Regards.
Please or to participate in this conversation.