You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
499 B
JavaScript
23 lines
499 B
JavaScript
|
|
var modal = document.getElementById("notesModal");
|
|
var modalContent = document.getElementById("noteContent");
|
|
|
|
function showModal(text, color) {
|
|
modalContent.innerHTML = text;
|
|
modalContent.style.backgroundColor = color;
|
|
|
|
modal.style.display = "flex";
|
|
}
|
|
|
|
function closeModal() {
|
|
modal.style.display = "none";
|
|
}
|
|
|
|
// Close the modal when clicking outside the container
|
|
window.onclick = function (event) {
|
|
if (event.target == modal) {
|
|
modal.style.display = "none";
|
|
}
|
|
}
|
|
|