$(function() { $('.slideshow').crossSlide({ fade: 1 }, [ { src: 'slideshow/1522154876.jpg', alt: '', from: 'top left', to: 'bottom left 1x', time: 10 }, { src: 'slideshow/1522155083.jpg', alt: '', from: 'top left', to: 'bottom left 1x', time: 10 }, { src: 'slideshow/1522155123.jpg', alt: '', from: 'top left', to: 'bottom left 1x', time: 10 }, { src: 'slideshow/1522155325.jpg', alt: '', from: 'top left', to: 'bottom left 1x', time: 10 }, { src: 'slideshow/1522155585.jpg', alt: '', from: 'top left', to: 'bottom left 1x', time: 10 }, { src: 'slideshow/1522155764.jpg', alt: '', from: 'top left', to: 'bottom left 1x', time: 10 } ], function(idx, img, idxOut, imgOut) { if (idxOut == undefined) { // starting single image phase, put up caption $('div.caption').text(img.alt).animate({ opacity: .7 }) } else { // starting cross-fade phase, take out caption $('div.caption').fadeOut() } }); });