title: How can I make my slideshow fade?
body: <p>Im trying to edit my current javascript file to make my image slideshow fade into each other rather than jumping from picture to picture. Here is my current code:</p>
  
  <pre><code>var MyImage=document.getElementById("myPhoto");
  
  var imageArray=["workone.jpg", "worktwo.jpg", "workthree.jpg"]
  
  var imageIndex=0;
  
  function changeImage () {
  myPhoto.setAttribute("src", imageArray [ imageIndex]);
  imageIndex++;
  if (imageIndex&gt;=imageArray.length) {
      imageIndex=0;
  }
  }
  
  var intervalHandle = setInterval(changeImage,4000);
  
  myPhoto.onclick=function() {
  clearInterval(intervalHandle);
  }    
  </code></pre>