Add smooth scroll to top of results
This commit is contained in:
parent
d488a6f275
commit
f4f24c4d0d
3 changed files with 8 additions and 1 deletions
|
@ -20,6 +20,10 @@
|
|||
* E-mail contact: <luca0n@luca0n.com>.
|
||||
*/
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-left: 15%;
|
||||
margin-right: 15%;
|
||||
|
|
|
@ -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';
|
||||
|
|
Reference in a new issue