-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscripts.js
More file actions
32 lines (28 loc) · 1.03 KB
/
Copy pathscripts.js
File metadata and controls
32 lines (28 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// scripts.js
document.querySelectorAll('.abstract-btn').forEach(function (btn) {
btn.onclick = function () {
var modal = document.getElementById('abstractModal');
modal.style.display = "block";
}
});
var span = document.getElementsByClassName("close")[0];
span.onclick = function () {
var modal = document.getElementById('abstractModal');
modal.style.display = "none";
}
window.onclick = function (event) {
var modal = document.getElementById('abstractModal');
if (event.target == modal) {
modal.style.display = "none";
}
}
document.getElementById("toggleAbstractButton").addEventListener("click", function () {
var content = document.getElementById("abstractContent");
if (content.style.display === "none") {
content.style.display = "block";
this.textContent = "[-] Abstract"; // Change button text to "Hide Abstract"
} else {
content.style.display = "none";
this.textContent = "[+] Abstract"; // Change button text back to "Show Abstract"
}
});