Add smooth scroll to top of results
This commit is contained in:
parent
d488a6f275
commit
f4f24c4d0d
|
@ -20,6 +20,10 @@
|
||||||
* E-mail contact: <luca0n@luca0n.com>.
|
* E-mail contact: <luca0n@luca0n.com>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
html {
|
||||||
|
scroll-behavior: smooth;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin-left: 15%;
|
margin-left: 15%;
|
||||||
margin-right: 15%;
|
margin-right: 15%;
|
||||||
|
|
|
@ -199,6 +199,9 @@ function setUpStrings(){
|
||||||
// Hide quiz and then show the results.
|
// Hide quiz and then show the results.
|
||||||
quizEl.style['display'] = 'none';
|
quizEl.style['display'] = 'none';
|
||||||
document.getElementById('results').style['display'] = 'unset';
|
document.getElementById('results').style['display'] = 'unset';
|
||||||
|
|
||||||
|
// Jump to the top of the results.
|
||||||
|
document.location = '#results';
|
||||||
}
|
}
|
||||||
quizEl.appendChild(finish);
|
quizEl.appendChild(finish);
|
||||||
warning.style['display'] = 'none';
|
warning.style['display'] = 'none';
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<h2 id="quiz-title">Unknown quiz</h2>
|
<h2 id="quiz-title">Unknown quiz</h2>
|
||||||
<p id="quiz-author">Unknown author</p>
|
<p id="quiz-author">Unknown author</p>
|
||||||
<div id="results">
|
<div id="results">
|
||||||
<center><p>And your privacy grade is:</p>
|
<center><p>Your privacy grade is:</p>
|
||||||
<span id="badge-s" class="badge grade-s">Grade S</span>
|
<span id="badge-s" class="badge grade-s">Grade S</span>
|
||||||
<span id="badge-a" class="badge grade-a">Grade A</span>
|
<span id="badge-a" class="badge grade-a">Grade A</span>
|
||||||
<span id="badge-b" class="badge grade-b">Grade B</span>
|
<span id="badge-b" class="badge grade-b">Grade B</span>
|
||||||
|
|
Reference in New Issue