Scroll Detection
How do I make an scroll detection?
What is a scroll detection? How do you make a scroll detection? This script and codes were developed by David Bellotti on 30 October 2022, Sunday.
Scroll Detection - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Scroll Detection</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <center> <h1 class="info"> thing </h1>
</center> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Scroll Detection - Script Codes CSS Codes
center { background-color: black; height: 101vh; width: 100vw;
}
.info { color: red; position: absolute; top: 50%; left: 50%; -webkit-transform: translateX(-50%) translateY(-50%); transform: translateX(-50%) translateY(-50%);
}
Scroll Detection - Script Codes JS Codes
var pos = 0;
$(window).scroll(function(e) { var currentPos = $(this).scrollTop(); if (currentPos <= pos) { $(".info").text("down"); } else if (currentPos > pos) { $(".info").text("up"); } e.preventDefault(); return false;
});
Developer | David Bellotti |
Username | dbellotti |
Uploaded | October 30, 2022 |
Rating | 3 |
Size | 2,186 Kb |
Views | 10,120 |
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 |
Arora | 10,447 Kb |
Princess Mononoke Forest Spirits - WIP | 2,667 Kb |
Fab menu v1 | 3,487 Kb |
Combinator | 2,193 Kb |
Rogue NASA | 2,278 Kb |
Animated Gradient | 2,110 Kb |
JQuery ui material design datepicker | 3,897 Kb |
Chromatic Depth | 2,301 Kb |
Red Curtain | 6,730 Kb |
Multi range slider with gradient | 2,909 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 |
Birthday Party Starter | Aussieyang | 1,629 Kb |
Css or Czz.. | Judag | 4,111 Kb |
A Pen by James Podles | Jpod | 2,656 Kb |
Angular-HAML | Cwacht | 2,022 Kb |
Matrix | Stathisnikolaidis | 1,922 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
Codero Sitemap | S1m0ne | 28,169 Kb |
DFF Website | Hawcubite | 10,123 Kb |
Count up | Alanshortis | 2,391 Kb |
Ghost | Mghayour | 11,738 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!