Fade in / Fade Out

Fade in / Fade Out

Newbie and first post of mine.

Would like to add fade in / fade out for the banner images.

Right now the banner rotates one by one

  1. // The Code am using //
  2. var images = ['images/banner-1.jpg', 'images/banner-2.jpg', 'images/banner-3.jpg', 'images/banner-4.jpg'];
  3. var i = 0;

  4. setInterval(function(){
  5. $('body').css('background-image', function() {
  6. if (i >= images.length) {
  7. i=0;
  8. }
  9. return 'url(' + images[i++] + ')';
  10. });
  11. }, 5000);
  12. //-----------------//

The working version is here.
Thanks in advance.
Amarnath Jaganathan