Slide Transition

Developer
Size
2,236 Kb
Views
12,144

How do I make an slide transition?

Slide transition works on jquery, css and html. What is a slide transition? How do you make a slide transition? This script and codes were developed by Krishna Babu on 11 January 2023, Wednesday.

Slide Transition Previews

Slide Transition - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Slide Transition</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <header> <h1>Slide Right to Left</h1>
</header>
<div class="showDiv"> <ul id="fslider"> <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> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Slide Transition - Script Codes CSS Codes

*{margin:0; padding:0;}
@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;
}	ul{width:3000px; position:relative;}	li{display:table;list-style:none; float:left;}	.showDiv{display:block; width:800px; height:300px; overflow:hidden; margin:0 auto;}	.img-figure{display:table-cell; width:800px; height:300px; text-align:center; vertical-align:middle;}	img{max-height:100%;max-width:100%;}

Slide Transition - Script Codes JS Codes

$(document).ready(function(){	var counter=0;	var li = $('#fslider li:eq(0)').clone();	$('#fslider').append(li);	$('#fslider').width($('#fslider li').length * $('.showDiv').width());	setInterval(function(){	counter++;	counter = (counter > ($('#fslider li').length - 1))?0:counter;	var pos = -($('.showDiv').width())*counter;	$('#fslider').animate({left: pos},1000, function(){	if(counter == ($('#fslider li').length - 1)){	$('#fslider').css('left','0');	counter=0;	}	});	}, 2000);	})
Slide Transition - Script Codes
Slide Transition - Script Codes
Home Page Home
Developer Krishna Babu
Username krishnab
Uploaded January 11, 2023
Rating 3
Size 2,236 Kb
Views 12,144
Do you need developer help for Slide Transition?

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!

Krishna Babu (krishnab) Script Codes
Create amazing love letters 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!