How to make fade in and fade out pictures?

Asked By 20 points N/A Posted on -
qa-featured

I want some pictures in my website to fade in / fade out after certain interval but I can't figure out how to do this. I know that

with the help of Javascript, it can be done. But I wanted to learn some other easy way to do this. Any suggestions?

SHARE
Best Answer by lucky1200
Best Answer
Best Answer
Answered By 0 points N/A #117403

How to make fade in and fade out pictures?

qa-featured

Well another way to do this is to use a html code. You are right when you say that javascript is involved, because you will need jquery javascript, but the html code will make your images do what you are wanting. Since you have stated that you do not want to do java there is another way. If you are familiar with myspace and other pages you wîll notice that you can suse à regular html code that will fade in and fade out your pictures.

Answered By 0 points N/A #117404

How to make fade in and fade out pictures?

qa-featured

 

You can use the following javascript code for the required job.

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){

      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[j].src

   if (document.all){

      document.images.SlideShow.filters.blendTrans.Play()

   }

  j = j + 1

   if (j > (p-1)) j=0

   t = setTimeout('runSlideShow()', slideShowSpeed)

}

</script>

This code will display images continuously with slide show and fade effects.

Related Questions