diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/script.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/static/script.js b/static/script.js index 639e743..10db48c 100644 --- a/static/script.js +++ b/static/script.js @@ -37,6 +37,10 @@ function display_example(i) { } } +function scrollTop() { + window.scrollTo(0, 0); +} + function spacebar() { if (revealed) { console.log("Next item"); @@ -46,5 +50,5 @@ function spacebar() { $("#gen_section").removeClass("gen_hidden"); revealed = true; } - window.scrollTo(0, 0); + window.setTimeout(scrollTop, 1); } |