Merge pull request #10 from Junyi-99/fix-ToC-cannot-click
Fix to c cannot click
This commit is contained in:
commit
ada44ff67d
@ -37,6 +37,7 @@ html {
|
||||
/* 2 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
<script>
|
||||
document.querySelector(".toc").addEventListener("click", function () {
|
||||
if (event.target.tagName !== "A") {
|
||||
event.preventDefault();
|
||||
if (this.open) {
|
||||
this.open = false;
|
||||
@ -15,5 +16,6 @@
|
||||
this.open = true;
|
||||
this.classList.add("expanded");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user