-
-
Save ymoussaba/ad087b13b05ef96623dd63a8441e8093 to your computer and use it in GitHub Desktop.
Revisions
-
rumblestrut created this gist
May 4, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,59 @@ Oh sure, you could do this with jQuery, but in my early days, this is what I used ... <script> <!-- // Set slideShowSpeed (milliseconds) var slideShowSpeed = 8000 // Duration of crossfade (seconds) var crossFadeDuration = 3 // Specify the image files var Pic = new Array() // don't touch this // to add more images, just continue // the pattern, adding to the array below Pic[0] = '0.jpg'; Pic[1] = '1.jpg'; Pic[2] = '2.jpg'; // ======================================= // do not edit anything below this line // ======================================= var Dummyt var nCounterj = 0 var PicLen = Pic.length var preLoad = new Array() for (nCounteri = 0; nCounteri < PicLen; nCounteri++){ preLoad[nCounteri] = new Image() preLoad[nCounteri].src = Pic[nCounteri] } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter='blendTrans(duration=2)' document.images.SlideShow.style.filter='blendTrans(duration=crossFadeDuration)' document.images.SlideShow.filters.blendTrans.Apply() } document.images.SlideShow.src = preLoad[nCounterj].src if (document.all){ document.images.SlideShow.filters.blendTrans.Play() } nCounterj = nCounterj + 1 if (nCounterj > (PicLen-1)) nCounterj=0 Dummyt = setTimeout('runSlideShow()', slideShowSpeed) } </script> --> ... <img src="" name='SlideShow' alt="SlideShow"> <script> runSlideShow(); </script> </a>