ToTop auto scroll
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 - 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; });
});
Developer | Tulula Smith |
Username | Tulula |
Uploaded | November 10, 2022 |
Rating | 3 |
Size | 1,957 Kb |
Views | 8,096 |
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!
Name | Size |
Color Generator | 5,883 Kb |
Text Shadow | 1,910 Kb |
Currency Conversion | 2,498 Kb |
A Pen by Tulula Smith | 1,611 Kb |
JS Video Control Play | 2,956 Kb |
Heart-it | 2,057 Kb |
Wireframe | 2,716 Kb |
Booty Button | 2,094 Kb |
Unique Number Gen | 2,530 Kb |
Drive Clock | 3,504 Kb |
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!
Name | Username | Size |
Project MMetro beta | Atomicsong | 5,157 Kb |
Weather App | OmranAbazid | 2,596 Kb |
CodeCamp Tribute Page | JonathanDeJesus | 6,860 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
Automatic scroll | Skeurentjes | 4,042 Kb |
Angular Route | Arun_v606 | 1,837 Kb |
Polygon Dodecahedron in CSS | Vennsoh | 7,606 Kb |
Basic 3D Fullscreen Transition | Apetrov | 3,270 Kb |
Mega Menu by Joni | Asakasinsky | 3,171 Kb |
Tree growth tests | Orchard | 3,818 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!