Wipe slider
How do I make an wipe slider?
Image slider with wipe transition. CSS + HTML + jQuery. What is a wipe slider? How do you make a wipe slider? This script and codes were developed by Krishna Babu on 11 January 2023, Wednesday.
Wipe slider - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wipe slider</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <header> <h1>Wipe Slider</h1>
</header>
<div id="container"> <div id="slider"> <ul> <li><figure class="img-figure"><img src="http://www.flashaddicts.com/clientdisplay/images/1.jpg"/></figure></li> <li><figure class="img-figure"><img src="http://www.flashaddicts.com/clientdisplay/images/2.jpg"/></figure></li> <li><figure class="img-figure"><img src="http://www.flashaddicts.com/clientdisplay/images/3.jpg"/></figure></li> <li><figure class="img-figure"><img src="http://www.flashaddicts.com/clientdisplay/images/4.jpg"/></figure></li> </ul> </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>
Wipe slider - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Raleway:400, 900);
body{background-color:#000; font-family: 'Raleway', sans-serif; color: #fff;}
header h1{ text-align: center; font-weight: bold; margin: 20px 0;
}
*{margin:0; padding:0;}
#container{width:100%; height:auto;}
#slider{width:800px;margin:0 auto;}
#slider ul{list-style:none;width:800px;height:300px;}
#slider ul li{position:absolute;}
Wipe slider - Script Codes JS Codes
$(document).ready( function(){ var counter=0; var imgurl,imgCounter; $('#container li').each(function(index){$('#container li:eq('+index+')').css('opacity', 0);}); $("#slider").prepend('<div style="width:800px; height:300px;position:absolute; z-index:99" id="fmask"></div>'); $('#container li:eq(0)').css('opacity', 1); imgurl = $('#container li:eq(1) img').attr('src'); $('#fmask').css({'width': '0px','background-image': 'url("' + imgurl + '")'}); function playAnim(){ flag = true; $('#fmask').animate({width:($('#slider').width())}, 1000, function(){ $('#slider ul li:eq('+counter+')').css('opacity', 0); counter++; imgCounter = counter = (counter > ($('#slider ul li').length - 1))?0:counter; $('#slider ul li:eq('+counter+')').css('opacity', 1); imgCounter++; imgCounter = (imgCounter > ($('#slider ul li').length - 1))?0:imgCounter; imgurl = $('#slider ul li:eq('+imgCounter+') img').attr('src'); $('#fmask').css({'width': '0px','background-image': 'url("' + imgurl + '")'}); }); } playAnim(); setInterval(playAnim, 5000);
});
Developer | Krishna Babu |
Username | krishnab |
Uploaded | January 11, 2023 |
Rating | 3 |
Size | 2,370 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 |
AngularJs Combobox | 2,015 Kb |
Delhi Metro | 6,344 Kb |
Customize Selector with Google Font | 2,448 Kb |
Image Swaping | 2,316 Kb |
Paging | 2,753 Kb |
Page | 1,939 Kb |
Upload Button | 2,535 Kb |
Justify Horizontal Menu | 2,589 Kb |
No effect slideshow | 2,123 Kb |
Background | 2,585 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 |
Yuliya v krylova | Rafszul | 37,351 Kb |
Menubar compass mixin | Michaelparenteau | 4,925 Kb |
Navier Stoke Fluid Simulation | Esimov | 8,584 Kb |
Ripples in water | Nobitagit | 2,704 Kb |
Social Profiles | Lachlanjc | 1,939 Kb |
Vue.js Lazy Loading | Kjbrum | 3,620 Kb |
Using Flickr API | MoyArt | 6,761 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
Page Transitions in Backbone | Mikefowler | 3,691 Kb |
Monochrome Form | AlienPiglet | 3,096 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!