开发者

setting longer delay between testimonial slider

We are using JS to make a testimonial slider. I need the pause between slides to be longer. So people get the chance to read the text, but going round in circles.

Any help appreciated.

The js is:

$(document).ready(function(){
var slider = function() {
    $('#testimonials .slide').filter(':visible').fadeOut(1000,function(){
        if($(this).next('li.slide').size()){
            $(this).next().fadeIn(2000);
        }
        else{
            $('#testimonials .slide').eq(0).fadeIn(1000);
        }
    });
};
var interval = setInterval(slider, 5000);
$('#testimonials .slide').hover(function() {
    clearInterval(interval);
}, function() {
    interval = setInterval(slider, 5000);
});

});

html is:

some message here
some message here

css is:

#testimonials {width: 500px;height: 100px;list-style-type: none !important;}
#testimonials .slide {list-style-type: none !important;}
blockquote {font-size: 18px;font-family:"proxima-nova-1","proxima-nova-2", Helvetica, Arial, sans开发者_StackOverflow社区-serif;color: #333;font-style: italic; line-height:24px;}


See the line...

interval = setInterval(slider, 5000);

...change the 5000 to a larger number. 1000 is roughly 1 second.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜