simple fading slide show

Written by @kerixa 24 February 2014

You can use the slider to make your website more beautiful. Slider is one of the cases that in addition to displaying photos in a row, it is possible to write text on it and change the photos with effects. This slider can usually be used to show gallery images or display photos of the latest news or the company achievements. In the following code, 4 images are displayed by a slider, each image is zoomed in a bit at a slow speed, and the fade animation is used to display the next slide. This means that the current image disappears and the next image is displayed gradually. This is a looping slider and displays the first slide again after displaying the fourth slide.

Code Snippet:

                                                <!-- this script is provided by coded by: Kerixa Inc. -->
<!-- this script got from by: Krishna Eydat -->

<script language="javascript" type="text/javascript">
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = ''
Pic[1] = ''
Pic[2] = ''
Pic[3] = ''

// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
function runSlideShow() {
if (document.all) {"blendTrans(duration=2)";"blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
//  End -->
<table border="0" cellpadding="0" cellspacing="0">
<td id="VU" height=190 width=330>
<img src="" name='SlideShow' width=330 height=190>

<br/><div style="clear:both"></div><div><a target="_blank" href=""><span style="font-size: 8pt; text-decoration: none">HTML Best Codes</span></a></div>
</html><a target='_blank' href='' style='font-size: 8pt; text-decoration: none'>Html Best Codes</a>                                                


About @kerixa

I am Krishna Eydat. I studied Software Engineering at University of Waterloo in Canada. I lead a few tech companies. I am passionate about the way we are connected. I would like to be part of something big or be the big deal!



Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

Online Users: 12
Recent Members: sahjahan, fk khan, Proper, Jenisha, Mr Joseph Charles
advertisement 2