On Sep 8, 6:48 pm, Mike Alsup <mal...@gmail.com> wrote:
> > Hey thanks Mike, I got the random timeouts working, however all the
> > slideshows fade in at the same time on the first transition... is
> > there any way around that? Here is my code:
>
> > <script type="text/javascript">
> > $(document).ready(function() {
> > $('.slideshow').cycle({
> >                 fx: 'fade',
> >                   timeout: 1,
> >                   pause: '1',
> >                   random: '1',
> >                   timeoutFn: calculateTimeout
> >         });
>
> > });
>
> > function calculateTimeout(numRand) {
> >     var numRand = Math.floor(Math.random()*5000)+2000;
> >     return numRand;
>
> > }
>
> Hmmm, currently the first transition still respects the 'timeout'
> option (which is in milliseconds).  So you would need to randomize
> that setting to achieve what you want.  I will fix that bug so that
> the first timeout also uses the timeoutFn.
>
> Mike


This is now supported correctly in v2.72.

Demo:     http://www.malsup.com/jquery/cycle/timeout-random.html
Download: http://www.malsup.com/jquery/cycle/download.html

Reply via email to