Just a simple slideshow using jquery
<div id="slideshow">
<img src="img/img1.jpg" alt="" class="active" />
<img src="img/img2.jpg" alt="" />
<img src="img/img3.jpg" alt="" />
</div>
Now let’s use CSS to position the images on top of each other and bring the active image to the top level with z-index:
#slideshow {
position:relative;
height:350px;
}
#slideshow IMG {
position:absolute;
top:0;
left:0;
z-index:8;
}
#slideshow IMG.active {
z-index:10;
}
#slideshow IMG.last-active {
z-index:9;
}
The main javascript code
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
The complete code
Download the code here
Note you can get the JS file from http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
Incoming search terms:
- slideshow using jquery (72)
- bopd inurl:/misc php?action= (20)
- slide show using jquery (8)
- jquery slideshow (7)
- bin inurl:;action=display;num= (7)
- Simple slideshow using jquery (7)
- sustainable inurl:/guestbook php?id= (6)
- j query slideshow (5)
- verbally inurl:/comments php?id= (4)
- technology inurl:/gaestebuch php?action= (4)
- inurl:/misc php?action= real upskirts (4)
- jquery mysql and php slideshow tutorial (4)
- cs-cart javascript slideshow banner (3)
- page turn slide show jquery (3)
- image slideshow in jsp using jquery (3)
- vitals /misc php?action= (3)
- jquery random slide show in jsp (3)
- slideshow using jquery in jsp (3)
- stood inurl:/gaestebuch php (3)
- slideshow using jquery and mysql (2)
- jquery slideshow examples code jsp (2)
- image slideshow from the mysqldatabase using jquery (2)
- how to program a slideshow using php (2)
- slideshow banner cs-cart (2)
- slide show j query code (2)
- inurl:/gaestebuch php elementary science projects (2)
- simple slideshow in jsp ajax jquery (2)
- jquery slideshow pageturn (2)
- javascript slideshow banner cs cart (2)
- jquery 1 2 6 slideshow (2)
- jquery imgflip (2)
- jquery div slide with submit button (2)
- jquery examples slideshow in jsp (2)
- jquery php read text file (2)
- <div id=slideshow> <img src=img/img1 jpg alt= class=active /> <img src=img/img2 jpg alt= /> <img src=img/img3 jpg alt= /> </div> (2)
- cs-cart javascript slideshow banner installation (2)
- using php to create slideshow (2)
- cs cart java script slideshow (2)
- jquery yahoo style picture slideshow (2)
- book flip slideshow html jquery (2)
You will also be interested in ,
- Buzzing or vibrating the login form using jquery
- Animated information box using simple jquery
- Simple page flip effect using Jquery, css and simple html
- Get youtube video screenshot using jquery
- Jquery Basics, How to use jquery?
- Create an animated button using jquery
- Replacing images with time intervals using jquery
- Random images per day using javascript and jquery
- Ajax and Jquery

