Skip to content
Snippets Groups Projects

Task 4006 online help content

Merged Saad bin Abid requested to merge task_4006-Online_help_content_ into master
Compare and Show latest version
4 files
+ 23
64
Compare changes
  • Side-by-side
  • Inline
Files
4
//Get the button
var upButton = document.getElementById("upBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
upButton.style.display = "block";
} else {
upButton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
\ No newline at end of file
Loading