Files
littlelink/app.js

9 lines
275 B
JavaScript
Raw Normal View History

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" });
}
});