/ Published in: XHTML
slideshow with cross-fade transition - no plugin required
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> $('html').addClass('js'); $(document).ready( function() { setInterval("switchSlide()", 4000); }); function switchSlide() { var slide = $("#slideshow .slide:first"); slide.hide(); $("#slideshow").append(slide); slide.fadeIn(1500); } </script> <style> #tagline {width:332px; height:27px; overflow:hidden; margin:11px 0 0 0; position:relative; left:0;} #slideshow .slide {position: absolute;left:0;} #slideshow .slide a, #slideshow .slide img{border:none;} .js #slideshow .slide {display: none;} </style> </head> <body> <div id="slideshow"> <div class="slide"> </div> <div class="slide"> </div> </div> </body> </html>