PDA

View Full Version : Background Image Slideshow faden



Rannon
10-10-2014, 08:26 PM
Hey guys,
I'm new here and I need your help...I have these Code to slide my background image in a table. It really works perfectly, but now I want to add a fade transition for my pictures. Hpe someone can help me....


<script type="text/javascript">

//Background Image Slideshow- Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com

//Specify background images to slide
var bgslides=new Array()
bgslides[0]="photo1.jpg"
bgslides[1]="photo2.jpg"
bgslides[2]="photo3.jpg"

//Specify interval between slide (in miliseconds)
var speed=3000

//preload images
var processed=new Array()
for (i=0;i<bgslides.length;i++){
processed[i]=new Image()
processed[i].src=bgslides[i]
}

var inc=-1

function slideback(){
if (inc<bgslides.length-1)
inc++
else
inc=0
document.getElementById? document.getElementById('bslide').style.backgroundImage='url('+processed[inc].src+')' : document.all['bslide'].background=processed[inc].src
}

if (document.all||document.getElementById)
window.onload=new Function('slideback();setInterval("slideback()",speed)')

</script>


<table width="100%" id="bslide" class="header_inhalt_container" border="0" cellpadding="0" cellspacing="0" ></table>

ddadmin
10-11-2014, 01:18 AM
This is a really old script, and is no longer supported. The closest current script on DD would be this one: http://www.dynamicdrive.com/dynamicindex14/bgcarousel.htm