Add smooth scroll to top of results

This commit is contained in:
luca0N! 2021-05-30 22:06:26 -03:00
parent d488a6f275
commit f4f24c4d0d
Signed by: luca0N
GPG key ID: 2E7B4655CF16D7D6
3 changed files with 8 additions and 1 deletions

View file

@ -20,6 +20,10 @@
* E-mail contact: <luca0n@luca0n.com>.
*/
html {
scroll-behavior: smooth;
}
body {
margin-left: 15%;
margin-right: 15%;

View file

@ -199,6 +199,9 @@ function setUpStrings(){
// Hide quiz and then show the results.
quizEl.style['display'] = 'none';
document.getElementById('results').style['display'] = 'unset';
// Jump to the top of the results.
document.location = '#results';
}
quizEl.appendChild(finish);
warning.style['display'] = 'none';