Mouseover carousel with indicator
How do I make an mouseover carousel with indicator?
What is a mouseover carousel with indicator? How do you make a mouseover carousel with indicator? This script and codes were developed by Jesper Hills on 13 October 2022, Thursday.
Mouseover carousel with indicator - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Mouseover carousel with indicator</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="item"> <div class="slides"> <img src="http://farm9.staticflickr.com/8182/8032890824_0e352c4f8a.jpg" /> <img src="http://farm9.staticflickr.com/8037/8027827160_18180f4b90.jpg" /> <img src="http://farm9.staticflickr.com/8177/8024145201_8152ff3a4d.jpg" /> <img src="http://farm9.staticflickr.com/8036/8040612463_22ab25e180.jpg" /> <img src="http://farm9.staticflickr.com/8309/8030348891_0f235d556e.jpg" /> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Mouseover carousel with indicator - Script Codes CSS Codes
body { background: #333; padding: 1em 4em; }
.item { margin: 0 auto; padding: 0 0 6px; width: 500px; overflow: hidden; position: relative;
}
.slides { width: 100%; overflow: hidden;
}
.slides { height: 330px; }
.slides img { display: block; }
.current { display: block; height: 4px; background: #CCC; overflow: hidden; position: absolute; bottom: -4px; left: 0; -webkit-transition: left 0.2s; -moz-transition: left 0.2s; -o-transition: left 0.2s; transition: left 0.2s;
}
.item:hover .current { bottom: 0;
}
Mouseover carousel with indicator - Script Codes JS Codes
var slides = $(".slides");
slides.each(function(){ // Variables var t = $(this), i = t.children(), n = i.length, w = t.width() / n, c = $('<div class="current" />').insertAfter(t); // Set width of indicator to single space c.width(w); // Hide all but first item i.not(":first").hide(); // Detect mouse move X co-ord t.on("mousemove", function(e){ // Divide by number of items // Round down to whole integer var to = Math.floor(e.offsetX/w); // Show item with index equal to this i.eq(to).show().siblings().hide(); // Move indicator c.css("left", (w * to)); });
});
Developer | Jesper Hills |
Username | nopr |
Uploaded | October 13, 2022 |
Rating | 3 |
Size | 2,264 Kb |
Views | 16,192 |
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 |
Peeling Button | 2,214 Kb |
Fake CSS Loader | 2,791 Kb |
Click-activated fluid width slider | 2,567 Kb |
Mobile UI Concept | 3,761 Kb |
CSS 3D Carousel | 2,986 Kb |
Full-height content with footer below fold | 2,350 Kb |
CSS Fab Ice Cream | 1,947 Kb |
CSS3 Record Collection | 3,602 Kb |
DRY-BEM with SCSS | 2,211 Kb |
Smooth click-activated slider | 2,424 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 |
Kudos Please | TimPietrusky | 6,624 Kb |
CSS Infinite 360 | APinix | 5,564 Kb |
Dragonball Dragon Radar | DouglasGlover | 2,157 Kb |
Lecture 1 | Law | 0 Kb |
Hoi hoi | JohnTheCat | 7,248 Kb |
Android Play Store With Slick Carousel | -J0hn- | 4,982 Kb |
Sticky menu on scroll | Senff | 2,869 Kb |
Alter bg opacity on hover... | Chrisboon27 | 2,054 Kb |
Flying Bee | Pwsm50 | 3,711 Kb |
Hovers with popups | Zacharyolson | 2,380 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!