add read more
option to song's about section
This commit is contained in:
@ -1,7 +1,18 @@
|
||||
const fullAbout = document.querySelector("#about #full_about")
|
||||
const summary = document.querySelector("#about #summary")
|
||||
|
||||
function showAbout() {
|
||||
summary.classList.toggle("hidden")
|
||||
fullAbout.classList.toggle("hidden")
|
||||
}
|
||||
|
||||
[fullAbout, summary].forEach(item => item.onclick = showAbout)
|
||||
|
||||
document.querySelectorAll("#lyrics a").forEach(item => {
|
||||
item.addEventListener("click", getAnnotation)
|
||||
})
|
||||
|
||||
function getAnnotation(e) {
|
||||
e.preventDefault()
|
||||
console.log(e.target.parentElement.getAttribute("href"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user