I made slideshow with jQuery Cycle, but i have a problem with the timers. After couple cycles they're messing up. How can i merge two cycle animations in one function and with one timer?
Thank You for any help.
xHTML:
<div id="slideshow">
<ul>
<li>
<div class="image"><img src="test.jpg" /></div>
<div class="description">Some text goes here</div>
</li>
<li>
<div class="image"><img src="test.jpg" /></div>
<div class="description">Some text goes here</div>
</li>
<li>
<div class="image"><img src="test.jpg" /></div>
<div class="description">Some text goes here</div>
</li>
</ul>
</div>
jQuery:
var img = $(this).find('#slideshow div.image');
var desc = $(this).find('#slideshow div.description');
$('#slideshow ul').cycle({
fx: 'scrollHorz',
speed: 'fast',
timeout: 5000,
next: '.next',
pause: 1,
slideExpr: img
});
$('#slideshow').cycle({
fx: 'scrollVert',
speed: 'fast',
timeout: 5000,
next: '.next',
pause: 1,
slideExpr: desc
});
I think you should:
$('#slideshow').cycle('next');
I see the approach in your code, gotta thank you the great idea you just gave me tho.