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.
12 lines
494 B
JavaScript
12 lines
494 B
JavaScript
const showNotesButton = document.getElementById("showNotesButton");
|
|
const notesContainer = document.getElementById("notesContainer");
|
|
|
|
showNotesButton.addEventListener("click", () => {
|
|
// Toggle the 'hidden' class on notesContainer
|
|
notesContainer.classList.toggle("hidden");
|
|
|
|
// Update the button text based on the container's visibility
|
|
const isHidden = notesContainer.classList.contains("hidden");
|
|
showNotesButton.textContent = isHidden ? "Show Notes" : "Hide Notes";
|
|
});
|