Skip to content

Commit

Permalink
【优化】样式
Browse files Browse the repository at this point in the history
  • Loading branch information
PJ-568 committed May 9, 2024
1 parent f3a073e commit 12e60f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
let coll = document.querySelectorAll('.collapsible');
coll.forEach(element => {
element.addEventListener("click", function() {
this.classList.toggle("active");
let content = this.nextElementSibling;
if (content && content.style.display === "block") {
content.style.display = "none";
Expand Down

0 comments on commit 12e60f5

Please sign in to comment.