Add JavaScript auto scroll when opening the value block

This commit is contained in:
2025-07-24 11:31:27 -04:00
parent 67495b5064
commit 1b5626b477
2 changed files with 11 additions and 1 deletions

8
app.js Normal file
View File

@@ -0,0 +1,8 @@
const valueBlock = document.getElementById("value-expanded");
document.querySelector('.value-block').addEventListener('toggle', function() {
if (this.open) {
// Code to execute when the details are opened
valueBlock.scrollIntoView({ behavior: "smooth" });
}
});