lise77
lise77

Reputation: 3

jquery slider playing automatically

I need help with the coding on the site I'm trying to build. www.diveintodesign.co.uk/ChrisMcCrone/index.html

The coding is from http://jquery.malsup.com/cycle/

The large image in the middle is the slideshow, the two bars on the left and right of it are the next and previous buttons which work fine but it won't run automatically for some reason, the javascript includes timeout:0

Does anyone know what I've done wrong?

Cheers,

Lise

Upvotes: 0

Views: 38

Answers (2)

Daan
Daan

Reputation: 2799

I looked up your code and the jQuery Cycle Plugin website. I think you have to change the timeout to a number which is higher than 0, else it doesn't automatically slide.

$('.slideshow').cycle({ 
    fx:     'scrollHorz', 
    speed:  'fast', 
    timeout: 5000,  // time in milliseconds you want
    next:   '#next', 
    prev:   '#prev' 
});

Also, I want to say that it's really not clear that the black bars on the side are the buttons to control the slideshow.

Upvotes: 0

Jase
Jase

Reputation: 830

I think setting timeout to the amount of time to hold on a slide is what you want.

$('.slideshow').cycle({ 
    fx:     'scrollHorz', 
    speed:  'fast', 
    timeout: 3000, // 3 seconds
    next:   '#next', 
    prev:   '#prev' 
});

Upvotes: 1

Related Questions