intro: Scroll to top when switching pages.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
class="w3-flex w3-dark-gray w3-center"
|
||||
>
|
||||
<div
|
||||
id="scrollbox"
|
||||
style="
|
||||
flex: 1 1 auto;
|
||||
overflow: auto;
|
||||
@@ -251,6 +252,7 @@
|
||||
index == 0 ? 'hidden' : 'visible';
|
||||
document.getElementById('right').style.visibility =
|
||||
index == slides.length - 1 ? 'hidden' : 'visible';
|
||||
document.getElementById('scrollbox').scrollTo(0, 0);
|
||||
}
|
||||
|
||||
let dots = [...document.getElementsByClassName('dot')];
|
||||
|
||||
Reference in New Issue
Block a user