I'm trying to create a dependent caption display from within the Cycle call:
$('#slideshow-images').cycle({
fx: 'scrollVert',
pager: '#slideshow-navigation',
activePagerClass: 'active',
timeout: 8000,
delay: 2000,
manualTrump:false,
before: captionProgress
});
function captionProgress(currSlideElement, nextSlideElement, options, forwardFlag) {
var arr = $('.slideshow-caption');
// need to do something here but don't know what...
}
So that before the new image slides in - the caption changes - caption has the same index as the image, but I don't quite know how to trigger the right caption.
Here's the structure of the slideshow:
<div id="slideshow-captions">
<div class="slideshow-caption active">
<h2>Heading 1</h2>
<h1>Consulting<br />
Services</h1>
</div>
<div class="slideshow-caption">
<h2>Heading 2</h2>
<h1>Consulting<br />
Services</h1>
</div>
<div class="slideshow-caption">
<h2>Heading 3</h2>
<h1>Consulting<br />
Services</h1>
</div>
</div>
<div id="slideshow-images">
<div class="slideshow-image">
<h1 class="heading">Gallery image</h1>
<img src="/images/header/01.jpg" alt="" width="620" height="304" />
</div>
<div class="slideshow-image">
<h1 class="heading">Gallery image</h1>
<img src="/images/header/02.jpg" alt="" width="620" height="304" />
</div>
<div class="slideshow-image">
<h1 class="heading">Gallery image</h1>
<img src="/images/header/03.jpg" alt="" width="620" height="304" />
</div>
</div>
Any idea how to achieve it?