9 lines
275 B
JavaScript
9 lines
275 B
JavaScript
|
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" });
|
||
|
}
|
||
|
});
|