ToTop auto scroll

Developer
Size
1,957 Kb
Views
8,096

How do I make an totop auto scroll?

ToTop auto scroll button.Done for a student. What is a totop auto scroll? How do you make a totop auto scroll? This script and codes were developed by Tulula Smith on 10 November 2022, Thursday.

ToTop auto scroll Previews

ToTop auto scroll - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ToTop auto scroll</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="btn"></div>
<section>Test</section> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

ToTop auto scroll - Script Codes CSS Codes

* { padding: 0; margin: 0;
}
div { width: 10vw; height: 10vw; background: red; position: fixed; bottom:0; left: 0; z-index: 1; display: none;
}
.out {display: none;}
section { width: 100%; height: 200vh; background: linear-gradient(#ddd,#666);
}

ToTop auto scroll - Script Codes JS Codes

$(document).ready(function() { //Checks the scroll position on load if ($(this).scrollTop() > 100) { $('#btn').fadeIn(); } $(window).scroll(function() { //Scrolling past 100px will trigger the fade in if ($(this).scrollTop() > 100) { $('#btn').fadeIn(); //Scroll less than 100px will trigger fade out } else { $('#btn').fadeOut(); } }); //Animate scrolling back to top on click $('#btn').click(function() { $('html, body').animate({ scrollTop: 0 }, 800); return false; });
});
ToTop auto scroll - Script Codes
ToTop auto scroll - Script Codes
Home Page Home
Developer Tulula Smith
Username Tulula
Uploaded November 10, 2022
Rating 3
Size 1,957 Kb
Views 8,096
Do you need developer help for ToTop auto scroll?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tulula Smith (Tulula) Script Codes
Create amazing sales emails with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!