Skip to content

Commit

Permalink
Ensure FAQ Dropdown Button Works
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberSphinxxx committed Oct 29, 2024
1 parent fc1e7c5 commit dda3cea
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,20 @@ function renderSavedPasswords() {
document.addEventListener('DOMContentLoaded', async function () {
await loadSavedPasswords();
generatePassword();
});

document.addEventListener('DOMContentLoaded', function() {
const dropdownBtns = document.querySelectorAll('.dropdown-btn');

dropdownBtns.forEach(btn => {
btn.addEventListener('click', function() {
this.classList.toggle('active');
const content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
});
});

0 comments on commit dda3cea

Please sign in to comment.