I want to use jQuery cycle to make a banner with several elements that have different automatically playing effects.
For instance I want the image to fade in and out. And the text on top of the image to scroll from left to right.
I made the following HTML:
<div class="slideshow">
<div>
<p>txt</p>
<img src="images/banner1.jpg" alt="banner1" />
</div>
<div>
<p>txt2</p>
<img src="images/banner2.jpg" alt="banner2" />
</div>
</div>
I tried to initiate a second jQuery cycle instance with an after inside the first. But that doesn't work.
$('.slideshow').cycle({
fx: 'fade',
after: function(currSlideElement, options) {
$('.slideshow p').cycle({
fx: 'scrollHorz'
});
}
});
I also tried two totally different .cycle
instances but then I got a next is undefined
error.